|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
public interface KeyCallback
This interface represents a function prototype for a key action.
A custom key callback function can be supplied for example for
Shell.setKeyHandler(KeyCallback). Key event handling can be
redirected this way to custom code.
If the key callback function is not given
the default Script.keyAction(Component, int, int)
is called.
Shell.setKeyHandler(KeyCallback),
Callbacks| Method Summary | |
|---|---|
boolean |
keyAction(Component source,
int op,
int code)
Called when key event has occurred. |
| Method Detail |
|---|
boolean keyAction(Component source,
int op,
int code)
source - Currently focused componentop - Operation that has occurred:
KEY_PRESSED,
KEY_RELEASED,
KEY_REPEATEDcode - unicode value of key (>=0) or special key code
(<0) for other keys
true if key event was consumed and should
not be processed anywhere elseKEY_UP,
KEY_DOWN,
KEY_LEFT,
KEY_RIGHT,
KEY_FIRE,
KEY_ESC,
KEY_ENTER,
KEY_CR,
KEY_DELETE,
KEY_BACKSPACE,
KEY_TAB,
KEY_OK,
KEY_BACK
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||