|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmoka.lang.Object
moka.io.Keyboard
Class Keyboard
is used to get low-level input from the
keyboard. Note that some methods has a static version. These methods are written with
an uppercase letter in this document to differenciate them from their instance counterparts, but they must be write with
a lowercase in a program. Ex: Keyboard.ngetchx() (Althrought it is written Ngetchx in this doccument)
Field Summary | |
static short |
ALPHA_KEY_COUNT
The number of alphabetic key the keyboard class handle. |
byte |
key_2nd
|
byte |
key_A
|
byte |
key_APPS
|
static short |
KEY_APPS
The APPS key. |
byte |
key_B
|
static short |
KEY_BACKSPACE
The BACKSPACE key. |
byte |
key_C
|
static short |
KEY_CHAR
The CHAR key. |
static short |
KEY_CLEAR
The CLEAR key. |
static short |
KEY_COUNT
The number of key the keyboard class handle. |
byte |
key_D
|
byte |
key_Diamnd
|
byte |
key_Down
|
byte |
key_E
|
byte |
key_ENTER
|
static short |
KEY_ENTER
The ENTER key. |
byte |
key_ENTER1
|
byte |
key_ENTER2
|
static short |
KEY_ENTRY
The ENTRY key. |
byte |
key_ESC
|
static short |
KEY_ESC
The ESC key. |
byte |
key_F
|
byte |
key_F1
|
static short |
KEY_F1
The F1 key. |
byte |
key_F2
|
static short |
KEY_F2
The F2 key. |
byte |
key_F3
|
static short |
KEY_F3
The F3 key. |
byte |
key_F4
|
static short |
KEY_F4
The F4 key. |
byte |
key_F5
|
static short |
KEY_F5
The F5 key. |
static short |
KEY_F6
The F6 key. |
static short |
KEY_F7
The F7 key. |
static short |
KEY_F8
The F8 key. |
byte |
key_G
|
byte |
key_H
|
byte |
key_I
|
static short |
KEY_INS
The INS key. |
byte |
key_J
|
byte |
key_K
|
byte |
key_L
|
byte |
key_Left
|
byte |
key_M
|
static short |
KEY_MATH
The MATH key. |
static short |
KEY_MEM
The MEM key. |
static short |
KEY_MODE
The MODE key. |
byte |
key_N
|
byte |
key_O
|
static short |
KEY_OFF
The OFF key. |
static short |
KEY_ON
The ON key. |
byte |
key_P
|
byte |
key_Q
|
static short |
KEY_QUIT
The QUIT key. |
byte |
key_R
|
static short |
KEY_RCL
The RCL key. |
byte |
key_Right
|
byte |
key_S
|
byte |
key_Shift
|
static short |
KEY_SIGN
The SIGN key. |
static short |
KEY_STO
The STO key. |
static short |
KEY_SWITCH
The SWITCH key. |
byte |
key_T
|
byte |
key_U
|
byte |
key_Up
|
byte |
key_V
|
static short |
KEY_VARLNK
The VARLNK key. |
byte |
key_W
|
byte |
key_X
|
byte |
key_Y
|
byte |
key_Z
|
static short |
SYSTEM_KEY_COUNT
The number of system key the keyboard class handle. |
Constructor Summary | |
Keyboard()
Initializes a newly allocated Keyboard. |
Method Summary | |
void |
checkKeys()
Checks if any key of the keyboard is pressed. |
void |
checkSysKeys()
Checks if any "system" key is pressed. |
static void |
flush()
Flushes the keyboard queue. |
short |
getKey()
Returns the key actually pressed. |
static short |
GetKey()
Checks to see if a keystroke is currently available. |
static short |
getKey(int delay)
Returns the key pressed in a specified delay. |
boolean |
hit()
Checks if a key is pressed. |
static boolean |
kbhit()
Checks if a key stroke is available. |
short |
ngetchx()
Wait for the user to press a key, then return the key. |
static short |
Ngetchx()
Wait for the user to press a key, then return the key. |
static short |
ngetchx(int delay)
Wait a specified delay for the user to press a key, then return the key. |
char |
readAlpha()
Returns the first (in alphabetic order) of the alphabetic keys pressed. |
Methods inherited from class moka.lang.Object |
equals, finalize, getClassName, toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final short KEY_COUNT
public static final short SYSTEM_KEY_COUNT
public static final short ALPHA_KEY_COUNT
public static final short KEY_F1
public static final short KEY_F2
public static final short KEY_F3
public static final short KEY_F4
public static final short KEY_F5
public static final short KEY_F6
public static final short KEY_F7
public static final short KEY_F8
public static final short KEY_ESC
public static final short KEY_QUIT
public static final short KEY_APPS
public static final short KEY_SWITCH
public static final short KEY_MODE
public static final short KEY_BACKSPACE
public static final short KEY_INS
public static final short KEY_CLEAR
public static final short KEY_VARLNK
public static final short KEY_CHAR
public static final short KEY_ENTER
public static final short KEY_ENTRY
public static final short KEY_STO
public static final short KEY_RCL
public static final short KEY_SIGN
public static final short KEY_MATH
public static final short KEY_MEM
public static final short KEY_ON
public static final short KEY_OFF
public byte key_Diamnd
public byte key_Shift
public byte key_2nd
public byte key_APPS
public byte key_ESC
public byte key_Right
public byte key_Down
public byte key_Left
public byte key_Up
public byte key_ENTER
public byte key_ENTER1
public byte key_ENTER2
public byte key_F1
public byte key_F2
public byte key_F3
public byte key_F4
public byte key_F5
public byte key_A
public byte key_B
public byte key_C
public byte key_D
public byte key_E
public byte key_F
public byte key_G
public byte key_H
public byte key_I
public byte key_J
public byte key_K
public byte key_L
public byte key_M
public byte key_N
public byte key_O
public byte key_P
public byte key_Q
public byte key_R
public byte key_S
public byte key_T
public byte key_U
public byte key_V
public byte key_W
public byte key_X
public byte key_Y
public byte key_Z
Constructor Detail |
public Keyboard()
Method Detail |
public void checkSysKeys()
public short ngetchx()
public static short Ngetchx()
public static short ngetchx(int delay)
delay
- The delay
public static short GetKey()
public void checkKeys()
public char readAlpha()
public boolean hit()
public static boolean kbhit()
public static void flush()
public static short getKey(int delay)
delay
- The delay
public short getKey()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |