06-10-2010 08:17 AM
Keypad.getKeyCode() and Keypad.keyCode()Hi
I'm trying to do the reverse of translating keycode to char, by using the Keypad class. Problem is both Keypad.getKeyCode() and Keypad.keyCode() always return 0, no matter what i do.
I have tried
Keypad.getKeyCode('a',0)
Keypad.keyCode('a',KeypadListener.STATUS_ALT)
Keypad.getKeyCode('a',0)
Keypad.keyCode('a',KeypadListener.STATUS_ALT)
But i always get 0.
Any ideas?
Thanks,
Dan.
06-11-2010 04:12 PM
I wasn't able to reproduce this. What BlackBerry Smartphone model and BlackBerry device software version are you testing on? You can find this under Options, About on the BlackBerry Smartphone.
06-13-2010 05:20 AM
I have seen this behavior both on the 7105 4.3.0 simulator, and 9105 5.0.0 simulator.
06-13-2010 05:30 AM
Sorry - I mean 8120 simulator and not 7105.
06-14-2010 12:34 PM
I tried the same simulators and still received 65,0,65,0, which is the expected behaviour.
Alt+a doesn't directly map to a key, which is why 0 is returned. However, I received 65 for the keyCode for the letter a.