J2ME: How to programmatically press the keyboard?

Is it possible to programmatically press the keyboard so that the number for the pressed key is displayed on the screen? See the screenshot below for a more detailed explanation:

alt text

Details:
Nokia N70
CLDC 1.1
MIDP 2.0

+3
source share
2 answers

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.

+3

, int , keyPressed (-8);

?

+1

Source: https://habr.com/ru/post/1732003/


All Articles