×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    6

    Smile 6230i select button

    Could anyone tell me the key code for the select button in the middle of the toggle key on the 6230i please? Many thanks, Martin.

  2. #2
    Regular Contributor
    Join Date
    Jul 2005
    Posts
    79

    Re: 6230i select button

    it is [-5]

    - Amin
    Thanks
    - Amin

  3. #3
    Registered User
    Join Date
    Feb 2006
    Posts
    6

    Re: 6230i select button

    Thanks Amin, I've tried that and it didn't work. Any other suggestions would be welcome. Martin.

  4. #4
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280

    Re: 6230i select button

    If you have a phone available (which I guess you do since you say you tried it), why can't you just make a small app that displays the key codes on screen:
    Code:
    class KeyCodeCanvas extends Canvas {
      
      int code;
    
      public void paint(Graphics g) {
        g.setColor(0);
        g.fillRect(0,0,getWidth(),getHeight());
        g.setColor(0xffffff);
        g.drawString("code=" + i,0,0,Graphics.TOP|Graphics.LEFT);
      }
    
      protected void keyPressed(int keycode) {
        code = keycode;
      }
    }
    Although I'm pretty sure it's -5.

    One thing to check for: if you are subclassing GameCanvas make sure you didn't pass true to the constructor of the superclass because that will suppress events for keys that map to game actions.

    shmoove

  5. #5
    Registered User
    Join Date
    Feb 2006
    Posts
    6

    Re: 6230i select button

    Tried that too, got all the key codes for every key from 0 to 9 including the * # and answer phone button, but the select button didn't output anything.

    I assume that when the select button is pressed the keyPressed method is not called therefore the key code is not given.

    Agreed that -5 is normally the key code for the fire button, but on the 6230i it doesn't work. Good point about the canvases but I've covered that off too.
    Last edited by martin-in-bath; 2006-02-20 at 22:09.

  6. #6
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280

    Re: 6230i select button

    Are you sure you didn't pass true to the suppressKeyEvents parameter of the GameCanvas contructor. That's the only reason I can think for the select button not to generate any keyPressed() calls.
    Code:
    class MyGameCanvas extends GameCanvas {
      public MyGameCanvas() {
        super(false); // <-- make sure you are not passing true.
    AFAIK the only key that never generates any events in any case is the end key.

    shmoove

  7. #7
    Registered User
    Join Date
    Feb 2006
    Posts
    6

    Re: 6230i select button

    I'm not using a game canvas, I'm just using a canvas. I do get key codes though from all the other keys.
    Thanks for the info though. I'll keep digging...
    Martin.

  8. #8
    Super Contributor
    Join Date
    Mar 2005
    Location
    Paris
    Posts
    814

    Re: 6230i select button

    try to put your canvas in fullscreen mode ...

  9. #9
    Super Contributor
    Join Date
    Feb 2006
    Posts
    689

    Re: 6230i select button

    Hi,
    you can print out the keycode in the keypressed method.
    Regards
    soku

  10. #10
    Regular Contributor
    Join Date
    Jan 2006
    Location
    India
    Posts
    87

    Re: 6230i select button

    Hi,

    Are u tried the both the ways.


    1.Directly checking the key code.
    if(keCode==-5){
    }

    2.Getting the gameAction for the keyCode and processing it.
    int action=getGameAction(keyCode);
    if(action==Canvas.FIRE){
    }


    Try the both the ways....

    - kamal

  11. #11
    Registered User
    Join Date
    Feb 2006
    Posts
    6

    Re: 6230i select button

    Thanks for these ideas, they are very good.

    I'm using a MIDP1.0 canvas, I'll use a gameCanvas and let you know.

  12. #12
    Registered User
    Join Date
    May 2006
    Posts
    5

    Re: 6230i select button

    Hey martin-in-bath, how did you go with this?

  13. #13
    Registered User
    Join Date
    Jun 2006
    Posts
    7

    Smile Re: 6230i select button

    Hi,

    Martin-in-bath and Quey, did you find any solution to this issue?

    This is something I found out,
    1. If absolutely No Command is added, then the LSK, MSK and RSK will call keyPressed() correctly
    2. If even a Single Command is added then the MSK will not call keyPressed()

    Regards,
    abhayan

Similar Threads

  1. Dialog button vs softkey button
    By apitoman in forum Symbian User Interface
    Replies: 2
    Last Post: 2011-07-19, 12:28
  2. Middle Select Button on Nokia 3650
    By njacharya21 in forum Mobile Java General
    Replies: 6
    Last Post: 2006-02-20, 18:51
  3. Changing the 'Select' Soft Button in an Implicit List
    By daniel_wave2005 in forum Mobile Java General
    Replies: 0
    Last Post: 2005-02-10, 21:05
  4. select cancel cba button
    By bsteeb@gmx.de in forum Symbian
    Replies: 2
    Last Post: 2005-01-12, 12:21
  5. Menu Select button using List object
    By abstractworlds in forum Mobile Java General
    Replies: 4
    Last Post: 2002-12-09, 13:08

Posting Permissions

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