0

I am fresher in j2me. I like to implement an application that should detect central key of the S40 device.I use this code

if(keyCode==-5&&c==2) { 
c=1;
repaint(); 
} else {
c=2; 
repaint(); 
}

it work only on simulator and but not work in S40 device.Does anyone know how to solve this problem.

bharath
  • 14,283
  • 16
  • 57
  • 95

1 Answers1

0

This is the key code for nokia s40 mobiles,

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

For more info look at this article, Canvas KeyCodes.

bharath
  • 14,283
  • 16
  • 57
  • 95