2

We are using Sun Java Wireless Toolkit 2.5.2 and lcdui package for our j2me application. We want to disable the navigation keys (UP, DOWN, LEFT, RIGHT) programmatically. How can I do it?

gnat
  • 6,213
  • 108
  • 53
  • 73
Saravanan
  • 11,372
  • 43
  • 143
  • 213

1 Answers1

5
public void keyPressed(int keyCode) {
        int action = getGameAction(keyCode);
        if (action == UP || action == DOWN || action == LEFT || action == RIGHT)
        {}
        else
            super.keyPressed(keyCode);
}
pheromix
  • 18,213
  • 29
  • 88
  • 158