07-18-2008 10:43 AM
Hello,
I was trying to figure out what character the left/right side key has. I would need to intercept that in an application like this:
public boolean keyChar(char key, int status, int time){ boolean retval = false; switch (key) { case Characters.<<<< SideKeyCharacter?? >>>>: //Action retval = true; break; } return retval; }
Is it possible to do that? Characters like A and B... work.
Solved! Go to Solution.
07-18-2008 10:58 AM
Keypad.KEY_CONVENIENCE_1
Keypad.KEY_CONVENIENCE_2
Available in 4.2.0+
07-18-2008 11:09 AM
thanks for this - in a previous project over a year ago we resorted to creating two helper applications users could assign to the convenience keys that talked to our main app... I was just about to the same thing for a new project so you've saved me from wasting a lot of time
cheers,
jon
07-18-2008 11:45 AM
I tried this:
case Keypad.KEY_CONVENIENCE_1: Dialog.alert("Convenience 1 clicked"); retval = true; break;
but it does not work. Did I do something wrong?
07-18-2008 11:51 AM - edited 07-18-2008 11:56 AM
Those are key constants, not characters. Look at the Keypad method summary for converting between key constants / keycodes / characters.
07-18-2008 12:26 PM
thanx mreed!
I tried this
Characters c1 = Keypad.map(Keypad.KEY_CONVENIENCE_1);
but it does not work! Is it correct to use the .map( ) function?
07-18-2008 02:16 PM