×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    13

    navigation key codes

    hello devz,

    what's wrong with received keyCode?
    i became for the navigation keys following codes:

    UP = -1
    DOWN = -2
    LEFT = -3
    RIGHT = -4
    FIRE = -5

    (working with WTK22, Nokia and Sony Ericsson SDK)

    but this is absolutely not conform with API description???

    thx. for any hints,

    master2003

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    UP, DOWN, LEFT, RIGHT and FIRE are not key codes, they are game actions. Try this:
    Code:
    void keyPressed(int keyCode) {
      System.out.println("Key code=" + keyCode);
      System.out.println("Game action=" + getGameAction(keyCode));
    }
    and you'll see what I mean.

    shmoove

  3. #3
    Registered User
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    13
    exacto mundo,

    thx. a lot shmoove

Posting Permissions

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