I'm trying to detect and override the Delete key on the Blackberry keyboard.
For some reason, it never makes it inside my case statement as when it hits that point:
Keypad.key(keycode) == 8
Keypad.KEY_DELETE == 127
What's my error?
public class MyField extends ListField implements KeyListener {
// ...
/** Implementation of KeyListener.keyDown */
public boolean keyDown(int keycode, int time) {
boolean retval = false;
switch (Keypad.key(keycode)) {
/* DELETE - Delete the timer */
case Keypad.KEY_DELETE:
if (Keypad.status(keycode) == KeyListener.STATUS_SHIFT) {
_myDeleteCmd.run();
retval = true;
}
break;
default:
retval = super.keyDown(keycode, time);
}
return retval;
}