How to use middle soft key command in GameCanvas when GameCanvas is setFullScreenMode(true), The middle key can be use in 6230 emulator but not in real phone.
Printable View
How to use middle soft key command in GameCanvas when GameCanvas is setFullScreenMode(true), The middle key can be use in 6230 emulator but not in real phone.
If you cannot use it on a real phone .. then that's all you need to know :)
Forget what you can or cannot do on the emulator, its what really works on the phone that counts.
Personally I don't use "Command" at all anymore. Draw your own text boxes, and monitor the keys yourself, its easier and more reliable, and more consistent.
The only thing you have to worry about is phones that allow multiple key presses at once, which may not be relevant to you anyway.
hi nnigel...Welcome to Nokia Discussion Boards!
IMHO what you can do is that ; store the value of keycode that you are getting from keyPressed (int code) to a variable and try printing it in canvas using drawString(); then you could get the keycode value of that particular key.
Here is some info that I got from the Nokia 6230 release notes.
Button mappings:
----------------
Basic navigation:
Navigating the MIDP lcdui high level UI elements is
done with arrow buttons below the phone display.
SEND key (green phone receiver key) can be used as
SELECT.
Game action mapping:
- Key 2, Scroll up -> UP
- Key 8, Scroll down -> DOWN
- Key 4, Scroll left -> LEFT
- Key 6, Scroll right -> RIGHT
- Key 5, Send button, Middle softkey -> FIRE
- Key 7 -> GAME_A
- Key 9 -> GAME_B
- Key * -> GAME_C
- Key # -> GAME_D
Key constants not defined in MIDP specification:
Up arrow key: -1
Down arrow key: -2
Left arrow key: -3
Right arrow key: -4
Select key: -5
Send key: -10
End key: -11
Other:
- On the PC keyboard Delete key works as left soft key, End key works
as middle soft key and page down works as right soft key.
Hope this helps.
regards
Gopal
I have the same problem. I wrote a little midlet to output all the keyCodes depending upon the button clicked, but the centre joystick click does not fire anything. Is this correct.
Some people have stated in other forum messages that a keycode is generated or that it states in the docs that it should be generated.
Have you been able to get it to generate a keypressed message.
regards Paul
My game uses the middle softkey , but I am using FullCanvas and not setFullScreenMode.
For nokia I use the following:
[code]
static int KEY_UP = -1;
static int KEY_DOWN = -2;
static int KEY_LEFT = -3;
static int KEY_RIGHT = -4;
static int KEY_SoftKey_Left = -6;
static int KEY_SoftKey_Right = -7;
static int KEY_SoftKey_Middle = -5;
[/code]
[url]http://discussion.forum.nokia.com/forum/showthread.php?t=82847&highlight=Nokia+6230[/url]
This may be useful.
Regards,
abhayan