|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.rim.device.api.ui.Keypad
Provides keypad functionality.
KeypadListener| Field Summary | ||
static long |
GUID_KEYPAD_CHANGED
GUID for global event sent when the current locale changes. |
|
static int |
HW_LAYOUT_32
QWERTY keyboard layout (87xx series). 38 keys. |
|
static int |
HW_LAYOUT_39
QWERTY keyboard layout (88xx series). 39 keys. |
|
static int |
HW_LAYOUT_LEGACY
Legacy QWERTY keyboard layout (57xx, 58xx series). 30 keys. |
|
static int |
HW_LAYOUT_PHONE
QWERTY /w phone keyboard layout (65xx, 67xx, 72xx, 75xx, 77xx series). 34 keys. |
|
static int |
HW_LAYOUT_REDUCED
Reduced QW-ER-TY-OP keyboard layout (71xx series). 23 keys. |
|
static int |
HW_LAYOUT_REDUCED_24
Reduced QW-ER-TY-OP keyboard layout (81xx series). 24 keys. |
|
static int |
KEY_ALT
ALT key constant. |
|
static int |
KEY_APPLICATION
Application key constant. |
|
static int |
KEY_BACKLIGHT
Backlight key constant. |
|
static int |
KEY_BACKSPACE
Backspace key constant. |
|
static int |
KEY_CONVENIENCE_1
Convenience Key 1 constant. |
|
static int |
KEY_CONVENIENCE_2
Convenience key 2 constant. |
|
static int |
KEY_DELETE
Delete key constant. |
|
static int |
KEY_END
End key constant. |
|
static int |
KEY_ENTER
Enter key constant. |
|
static int |
KEY_ESCAPE
Escape key constant. |
|
static int |
KEY_MENU
Menu key constant. |
|
static int |
KEY_MIDDLE
Middle key (between SEND and END) constant. |
|
static int |
KEY_NEXT
Next key constant. |
|
static int |
KEY_SEND
Send key constant. |
|
static int |
KEY_SHIFT_LEFT
Left-shift key constant. |
|
static int |
KEY_SHIFT_RIGHT
Right-shift key constant. |
|
static int |
KEY_SHIFT_X
Right-shift/0 key constant. |
|
static int |
KEY_SPACE
Space key constant. |
|
static int |
KEY_SPEAKERPHONE
Speakerphone toggle key constant. |
|
static int |
KEY_VOLUME_DOWN
Volume down key constant. |
|
static int |
KEY_VOLUME_UP
Volume up key constant. |
|
| Method Summary | ||
static char |
getAltedChar(char ch)
Retrieves alternate version of specified character. |
|
static int |
getHardwareLayout()
Retrieves system keyboard harware style. |
|
static int |
getKeyCode(char ch,
int status)
Performs reverse lookup of key code that corresponds to given char and status. |
|
static Locale |
getLocale()
Retrieves this keypad's locale. |
|
static char |
getUnaltedChar(char ch)
Retrieves the un-alted version of a character. |
|
static boolean |
hasCurrencyKey()
Determines if the device has dedicated Currency key. |
|
static boolean |
hasSendEndKeys()
Determines if the device has dedicated SEND/END keys. |
|
static boolean |
isOnKeypad(char ch)
Determines if a key is on the keypad. |
|
static boolean |
isValidKeyCode(int keycode)
Determines if a keycode is valid in this keymap. |
|
static int |
key(int keycode)
Retrieves the key portion of the specified keycode. |
|
static int |
keycode(char scancode,
int status)
Retrieves keycode, given base character and modifier key state. |
|
static char |
map(int keycode)
Retrieves character matching keycode from keymap. |
|
static char |
map(int key,
int status)
Retrieves character matching specified key from the keymap. |
|
static int |
status(int keycode)
Retrieves state of modifier keys, given keycode. |
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final long GUID_KEYPAD_CHANGED
public static final int HW_LAYOUT_32
public static final int HW_LAYOUT_39
public static final int HW_LAYOUT_LEGACY
public static final int HW_LAYOUT_PHONE
public static final int HW_LAYOUT_REDUCED
public static final int HW_LAYOUT_REDUCED_24
public static final int KEY_ALT
The ALT key has no label -- it is the coloured key just below the A key and to the left of the Z key.
public static final int KEY_CONVENIENCE_1
public static final int KEY_CONVENIENCE_2
public static final int KEY_MIDDLE
public static final int KEY_SHIFT_X
public static final int KEY_SPEAKERPHONE
| Method Detail |
public static char getAltedChar(char ch)
Invoke this method to retrieve the character produced through pressing the ALT key in combination with your specified character. If the character cannot be alted, then 0 is returned.
For example, these are true on a RIM 5800 device:
getAltedChar('W') == '2'
getAltedChar('2') == '\u0000'
And, these are true on a RIM 6700 device:
getAltedChar('W') == '1'
getAltedChar('1') == '\u0000'
Note: to get the alted version of a key, use
Keypad.map(Keypad.key(keycode), KeypadListener.STATUS_ALT).
ch - Character for which to derive alternate version.getUnaltedChar(char)public static int getHardwareLayout()
public static int getKeyCode(char ch,
int status)
Field.keyChar(char character, int status, int time) event callbacks
to obtain original keycode.ch - Character that would be generated by current input map with resulting
keycode and given statusstatus - Status value for keymap(int key, int status)public static Locale getLocale()
public static char getUnaltedChar(char ch)
Invoke this method to retrieve the character produced through not pressing the ALT key in combination with your specified character. If the character cannot be unalted, then 0 is returned.
For example, these are true on a RIM 5800 device:
getUnaltedChar('W') == '\u0000'
getUnaltedChar('2') == 'W'
And, these are true on a RIM 6700 device:
getUnaltedChar('W') == '\u0000'
getUnaltedChar('1') == 'W'
Note: to get the alted version of a key, use
Keypad.map(Keypad.key(keycode), KeypadListener.STATUS_ALT).
ch - Character for which to derive alternate version.getAltedChar(char)public static boolean hasCurrencyKey()
public static boolean hasSendEndKeys()
public static boolean isOnKeypad(char ch)
ch - Character key to verify.public static boolean isValidKeyCode(int keycode)
keycode - Keycode you want to check.public static int key(int keycode)
keycode - Keycode for a key.
public static int keycode(char scancode,
int status)
Invoke this method to retrieve a particular keycode, given the base character and state of the modifier keys.
Return result is the direct composition of scancode and status values. The method does not invoke any keypad/language specific facilities for composition.
scancode - Base character.status - State of the modifier keys.public static char map(int keycode)
Invoke this method to retrieve a specific character from this keymap, given its keycode.
keycode - Keycode of key.
public static char map(int key,
int status)
Invoke this method to retrieve a specific character from this keymap, given a particular key and status value.
key - The key.status - Status value for key; this consists of the state of the
various modifier keys.public static int status(int keycode)
Invoke this method to retrieve the state modifier keys must be in to produce a particular key code.
keycode - Keycode for which you want to infer the modifier key
state.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2008 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.