Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2008

    midlet program navigation keys

    How can I use the navigations keys or keypad keys to assign commands in a midlet (like soft keys)?
    I need a midlet that performs specific actions when these keys are pressed.
    Thank you.

  2. #2
    Regular Contributor
    Join Date
    Mar 2005
    Hamburg, Germany

    Re: midlet program navigation keys

    Hello sebiskaa,

    The normal high-level interface elements take control of the navigation keys and do not allow you change the behaviour.

    You need either a Canvas or a CustomItem. These classes have methods keyPressed() and keyReleased().

    You need some code like this in your keyReleased method:
    int gamecode = this.getGameAction(keyCode);
    switch (gamecode){
       case DOWN:
       case UP:

    Karsten Meier

  3. #3
    Registered User
    Join Date
    Mar 2008

    Re: midlet program navigation keys

    any other way of doing this from netbeans?

Similar Threads

  1. Testers for free OCR program wanted
    By caddydc2 in forum News and Announcements
    Replies: 3
    Last Post: 2009-11-30, 05:29
  2. there is any mobile configuration to run selevlet program from midlet that send sms
    By amr_hhh in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2008-04-26, 17:29
  3. Opening connection to the secure element fails when restarting the midlet.
    By tfroidcoeur in forum Near Field Communication
    Replies: 6
    Last Post: 2007-08-24, 08:38
  4. Minimizing and Maximizing a Midlet
    By lekkie in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2007-02-20, 08:15
  5. 技术文档:MIDP 2.0安全机制 与 MIDlet 数字签名
    By wotrust in forum [Archived] Other Programming Discussion 关于其他编程技术的讨论
    Replies: 0
    Last Post: 2006-12-30, 07:42

Posting Permissions

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