How you approach it will depend on what you want to achieve.
You can easily simulate keystrokes on Canvasby calling your Canvas methods keyPressed(), keyReleased()and keyRepeated().
This can be useful for testing the game on the canvas, ensuring that the specified state is entered when certain keys are pressed on the canvas.
- . , MIDlet, LCDUI Form List, TextBox. , , Eggplant.