×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Aug 2007
    Posts
    14

    Nokia N81 soft keys

    I have just noticed a problem with the N81 8GB. I am trying to determine the values of the keys in the handset and the following keys do not return a key code:

    Left soft key
    Right soft key
    camera button
    volume buttons
    the 2 game buttons on the top of the screen.

    In addition, the player buttons only respond to the Nokia player application. It is a pity this cannot be changed as I am developing a media player application.

    But the main problem is that the soft menu keys do not respond. They do work when using in conjunction with CommandAction, but I don't want to use that kind of menu as I use my own style.

    The standard codes for the left and right soft keys are -6 and -7. So these keys ONLY work when used in conjunction with CommandListener on a Canvas or MIDlet etc.

    Another problem is that the volume buttons do not work in Java.

    I have just updated the firmware to version 11.0.045 today.

    Thanks,
    Ronan.

  2. #2
    Registered User
    Join Date
    Feb 2008
    Posts
    8

    Re: Nokia N81 soft keys

    Quote Originally Posted by ronanocie View Post
    I have just noticed a problem with the N81 8GB. I am trying to determine the values of the keys in the handset and the following keys do not return a key code:

    Left soft key
    Right soft key
    camera button
    volume buttons
    the 2 game buttons on the top of the screen.

    In addition, the player buttons only respond to the Nokia player application. It is a pity this cannot be changed as I am developing a media player application.

    But the main problem is that the soft menu keys do not respond. They do work when using in conjunction with CommandAction, but I don't want to use that kind of menu as I use my own style.

    The standard codes for the left and right soft keys are -6 and -7. So these keys ONLY work when used in conjunction with CommandListener on a Canvas or MIDlet etc.

    Another problem is that the volume buttons do not work in Java.

    I have just updated the firmware to version 11.0.045 today.

    Thanks,
    Ronan.
    Do you use Canvas or GameCanvas?


    -------
    JavaTech
    j2me mobile software

  3. #3
    Registered User
    Join Date
    Aug 2007
    Posts
    14

    Re: Nokia N81 soft keys

    I am using a Canvas. Here is the code:

    import javax.microedition.lcdui.*;

    /**
    * @author ronanoc
    */
    public class KeyCodeCanvas extends Canvas implements Runnable {
    Font font;
    String key = "---";
    Thread t;

    public KeyCodeCanvas(KeyCodeMidlet midlet) {
    this.midlet = midlet;
    t = new Thread(this);
    t.start();

    font = Font.getFont(Font.FACE_PROPORTIONAL, Font.STYLE_BOLD, Font.SIZE_LARGE);

    }

    public void run() {
    while (true) {
    repaint();

    try {
    Thread.sleep(100);
    } catch (InterruptedException ie) {

    }
    }
    }

    public void paint(Graphics g) {
    g.setColor(0x000000);
    g.fillRect(0, 0, getWidth(), getHeight());
    g.setColor(0xFFFFFF);
    g.setFont(font);
    g.drawString(key, getWidth()/2,getHeight()/2, Graphics.TOP | Graphics.HCENTER);

    g.drawString("KEY TEST", getWidth()/2, 5, Graphics.TOP|Graphics.HCENTER);
    }

    protected void keyPressed(int keyCode) {
    key = "" + keyCode;
    }


    }

  4. #4
    Registered User
    Join Date
    Feb 2008
    Posts
    8

    Re: Nokia N81 soft keys

    so maybe you should check it on GameCanvas

    -------
    JavaTech
    j2me mobile software

  5. #5
    Registered User
    Join Date
    Jul 2006
    Posts
    25

    Question Re: Nokia N81 soft keys

    Quote Originally Posted by mobile j2me applications View Post
    so maybe you should check it on GameCanvas

    -------
    JavaTech
    j2me mobile software

    Hi!

    What is the result?

    What codes has N81 for LeftSoftKey and RightSoftKey (in Canvas setFullScreenMode)?

  6. #6
    Registered User
    Join Date
    Jan 2009
    Posts
    1

    Re: Nokia N81 soft keys

    I can't remember now, sorry. The phone was stolen shortly after I posted last

    :'-(

  7. #7
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Nokia N81 soft keys

    You will not get keyPressed() events if you have a CommandListener.

    Media keys do not generate events, unless you add:

    Code:
    Nokia-UI-Enhancement: MusicKeysSupported
    to the JAD. (Will work only on later Series 60s (3FP2).)

    To use the dpad centre in a non-fullscreen app, you must add:

    Code:
    Nokia-MIDlet-S60-Selection-Key-Compatibility: true
    to the JAD.

    Hope that helps.

    Cheers,
    Graham.

  8. #8
    Registered User
    Join Date
    Jul 2006
    Posts
    25

    Re: Nokia N81 soft keys

    Quote Originally Posted by grahamhughes View Post
    You will not get keyPressed() events if you have a CommandListener.

    Media keys do not generate events, unless you add:

    Code:
    Nokia-UI-Enhancement: MusicKeysSupported
    to the JAD. (Will work only on later Series 60s (3FP2).)

    To use the dpad centre in a non-fullscreen app, you must add:

    Code:
    Nokia-MIDlet-S60-Selection-Key-Compatibility: true
    to the JAD.

    Hope that helps.

    Cheers,
    Graham.

    ok, thanks!

Similar Threads

  1. ###Upgrading Firmware###
    By zahid44 in forum General Development Questions
    Replies: 27
    Last Post: 2008-10-21, 07:17

Posting Permissions

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