Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Apr 2005

    Question GameCanvas Middle Soft Key Problem

    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.

  2. #2
    Regular Contributor
    Join Date
    Aug 2003
    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.

  3. #3
    Super Contributor
    Join Date
    Nov 2003
    Bangalore , India
    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

    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

    - 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.


  4. #4
    Registered User
    Join Date
    Oct 2004
    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

  5. #5
    Regular Contributor
    Join Date
    Aug 2003
    My game uses the middle softkey , but I am using FullCanvas and not setFullScreenMode.

    For nokia I use the following:

    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;

  6. #6
    Registered User
    Join Date
    Jun 2006

    Re: GameCanvas Middle Soft Key Problem


    This may be useful.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts