public class Keypad extends Object
Keypad
class encapsulates the hardware keypad of the device. Usually
it's not used for soft keypad. To operate the Keypad, use getKeypad()
to get the Keypad object.Modifier and Type | Field and Description |
---|---|
static char |
KEY_ASTERISK |
static char |
KEY_BACK |
static char |
KEY_DOT |
static int |
KEY_EVENT_INVALID |
static int |
KEY_EVENT_PRESSED |
static int |
KEY_EVENT_RELEASED |
static char |
KEY_FUNC1 |
static char |
KEY_FUNC2 |
static char |
KEY_FUNC3 |
static char |
KEY_FUNC4 |
static char |
KEY_FUNC5 |
static char |
KEY_FUNC6 |
static char |
KEY_HASH |
static char |
KEY_INVALID |
static char |
KEY_NUM0 |
static char |
KEY_NUM1 |
static char |
KEY_NUM2 |
static char |
KEY_NUM3 |
static char |
KEY_NUM4 |
static char |
KEY_NUM5 |
static char |
KEY_NUM6 |
static char |
KEY_NUM7 |
static char |
KEY_NUM8 |
static char |
KEY_NUM9 |
static char |
KEY_OK |
static char |
KEY_POUND |
static char |
KEY_POWER |
static char |
KEY_USER1 |
static char |
KEY_USER2 |
static char |
KEY_USER3 |
static char |
KEY_USER4 |
static char |
KEY_USER5 |
static char |
KEY_USER6 |
Modifier and Type | Method and Description |
---|---|
KeypadEventListener |
getKeyListener()
Gets the current Keypad Listener
|
static Keypad |
getKeypad()
Gets the Keypad of current device
|
void |
setKeyListener(KeypadEventListener listener)
Sets the current Keypad Listener
|
public static final char KEY_NUM0
public static final char KEY_NUM1
public static final char KEY_NUM2
public static final char KEY_NUM3
public static final char KEY_NUM4
public static final char KEY_NUM5
public static final char KEY_NUM6
public static final char KEY_NUM7
public static final char KEY_NUM8
public static final char KEY_NUM9
public static final char KEY_ASTERISK
public static final char KEY_HASH
public static final char KEY_POUND
public static final char KEY_DOT
public static final char KEY_BACK
public static final char KEY_OK
public static final char KEY_POWER
public static final char KEY_USER1
public static final char KEY_USER2
public static final char KEY_USER3
public static final char KEY_USER4
public static final char KEY_USER5
public static final char KEY_USER6
public static final char KEY_FUNC1
public static final char KEY_FUNC2
public static final char KEY_FUNC3
public static final char KEY_FUNC4
public static final char KEY_FUNC5
public static final char KEY_FUNC6
public static final char KEY_INVALID
public static final int KEY_EVENT_INVALID
public static final int KEY_EVENT_PRESSED
public static final int KEY_EVENT_RELEASED
public void setKeyListener(KeypadEventListener listener)
the
- event listener of the Keypad. Set to null to stop listening Keypad event.
NOTE: If set to non-null listener to start listening events, it's good to stop listening
before quit app or don't want to get any Keypad events anymore, by set it to null.public KeypadEventListener getKeyListener()
KeypadEventListener
public static Keypad getKeypad() throws IOException
Keypad
instance.IOException
- if no Keypad installed