moka.io
Class RowRead

java.lang.Object
  |
  +--moka.lang.Object
        |
        +--moka.io.RowRead

public final class RowRead
extends Object

Class RowRead is used to get low-level input from the keyboard. Its features are less powerfull than the ones of the Keyboard class, but it is more efficient. The key static methods provided in this class are realy fast ways to determine if a particular key is pressed.

Since:
MDK2.2

Field Summary
static boolean key_2nd
          Checks if the 2ND key is pressed.
static boolean key_A
          Checks if the A key is pressed.
static boolean key_ANY
          Checks if ANY key is pressed.
static boolean key_APPS
          Checks if the APPS key is pressed.
static boolean key_B
          Checks if the B key is pressed.
static boolean key_C
          Checks if the C key is pressed.
static boolean key_D
          Checks if the D key is pressed.
static boolean key_Diamnd
          Checks if the DIAMOND key is pressed.
static boolean key_Down
          Checks if the DOWN key is pressed.
static boolean key_E
          Checks if the E key is pressed.
static boolean key_ENTER
          Checks if the ENTER key is pressed.
static boolean key_ENTER1
          Checks if the ENTER1 key is pressed.
static boolean key_ENTER2
          Checks if the ENTER2 key is pressed.
static boolean key_ESC
          Checks if the ESC key is pressed.
static boolean key_F
          Checks if the F key is pressed.
static boolean key_F1
          Checks if the F1 key is pressed.
static boolean key_F2
          Checks if the F2 key is pressed.
static boolean key_F3
          Checks if the F3 key is pressed.
static boolean key_F4
          Checks if the F4 key is pressed.
static boolean key_F5
          Checks if the F5 key is pressed.
static boolean key_G
          Checks if the G key is pressed.
static boolean key_H
          Checks if the H key is pressed.
static boolean key_I
          Checks if the I key is pressed.
static boolean key_J
          Checks if the J key is pressed.
static boolean key_K
          Checks if the K key is pressed.
static boolean key_L
          Checks if the L key is pressed.
static boolean key_Left
          Checks if the LEFT key is pressed.
static boolean key_M
          Checks if the M key is pressed.
static boolean key_N
          Checks if the N key is pressed.
static boolean key_O
          Checks if the O key is pressed.
static boolean key_P
          Checks if the P key is pressed.
static boolean key_Q
          Checks if the Q key is pressed.
static boolean key_R
          Checks if the R key is pressed.
static boolean key_Right
          Checks if the RIGHT key is pressed.
static boolean key_S
          Checks if the S key is pressed.
static boolean key_Shift
          Checks if the SHIFT key is pressed.
static boolean key_T
          Checks if the T key is pressed.
static boolean key_U
          Checks if the U key is pressed.
static boolean key_Up
          Checks if the UP key is pressed.
static boolean key_V
          Checks if the V key is pressed.
static boolean key_W
          Checks if the W key is pressed.
static boolean key_X
          Checks if the X key is pressed.
static boolean key_Y
          Checks if the Y key is pressed.
static boolean key_Z
          Checks if the Z key is pressed.
 
Constructor Summary
RowRead()
           
 
Method Summary
static void disable()
          Disable RowRead operation.
static void enable()
          Enable RowRead operation.
static boolean keyTest(short row, short col)
          Handle low level keyboard reading for single keys.
static ushort rowRead(moka.lang.UShort row)
          Handle low level keyboard reading for simultaneous reading of more than one key.
 
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

key_Diamnd

public static boolean key_Diamnd
Checks if the DIAMOND key is pressed. Value is true if the key is pressed, false otherwize.


key_Shift

public static boolean key_Shift
Checks if the SHIFT key is pressed. Value is true if the key is pressed, false otherwize.


key_2nd

public static boolean key_2nd
Checks if the 2ND key is pressed. Value is true if the key is pressed, false otherwize.


key_APPS

public static boolean key_APPS
Checks if the APPS key is pressed. Value is true if the key is pressed, false otherwize.


key_ESC

public static boolean key_ESC
Checks if the ESC key is pressed. Value is true if the key is pressed, false otherwize.


key_Right

public static boolean key_Right
Checks if the RIGHT key is pressed. Value is true if the key is pressed, false otherwize.


key_Down

public static boolean key_Down
Checks if the DOWN key is pressed. Value is true if the key is pressed, false otherwize.


key_Left

public static boolean key_Left
Checks if the LEFT key is pressed. Value is true if the key is pressed, false otherwize.


key_Up

public static boolean key_Up
Checks if the UP key is pressed. Value is true if the key is pressed, false otherwize.


key_ENTER

public static boolean key_ENTER
Checks if the ENTER key is pressed. Value is true if the key is pressed, false otherwize.


key_ENTER1

public static boolean key_ENTER1
Checks if the ENTER1 key is pressed. Value is true if the key is pressed, false otherwize.


key_ENTER2

public static boolean key_ENTER2
Checks if the ENTER2 key is pressed. Value is true if the key is pressed, false otherwize.


key_F1

public static boolean key_F1
Checks if the F1 key is pressed. Value is true if the key is pressed, false otherwize.


key_F2

public static boolean key_F2
Checks if the F2 key is pressed. Value is true if the key is pressed, false otherwize.


key_F3

public static boolean key_F3
Checks if the F3 key is pressed. Value is true if the key is pressed, false otherwize.


key_F4

public static boolean key_F4
Checks if the F4 key is pressed. Value is true if the key is pressed, false otherwize.


key_F5

public static boolean key_F5
Checks if the F5 key is pressed. Value is true if the key is pressed, false otherwize.


key_A

public static boolean key_A
Checks if the A key is pressed. Value is true if the key is pressed, false otherwize.


key_B

public static boolean key_B
Checks if the B key is pressed. Value is true if the key is pressed, false otherwize.


key_C

public static boolean key_C
Checks if the C key is pressed. Value is true if the key is pressed, false otherwize.


key_D

public static boolean key_D
Checks if the D key is pressed. Value is true if the key is pressed, false otherwize.


key_E

public static boolean key_E
Checks if the E key is pressed. Value is true if the key is pressed, false otherwize.


key_F

public static boolean key_F
Checks if the F key is pressed. Value is true if the key is pressed, false otherwize.


key_G

public static boolean key_G
Checks if the G key is pressed. Value is true if the key is pressed, false otherwize.


key_H

public static boolean key_H
Checks if the H key is pressed. Value is true if the key is pressed, false otherwize.


key_I

public static boolean key_I
Checks if the I key is pressed. Value is true if the key is pressed, false otherwize.


key_J

public static boolean key_J
Checks if the J key is pressed. Value is true if the key is pressed, false otherwize.


key_K

public static boolean key_K
Checks if the K key is pressed. Value is true if the key is pressed, false otherwize.


key_L

public static boolean key_L
Checks if the L key is pressed. Value is true if the key is pressed, false otherwize.


key_M

public static boolean key_M
Checks if the M key is pressed. Value is true if the key is pressed, false otherwize.


key_N

public static boolean key_N
Checks if the N key is pressed. Value is true if the key is pressed, false otherwize.


key_O

public static boolean key_O
Checks if the O key is pressed. Value is true if the key is pressed, false otherwize.


key_P

public static boolean key_P
Checks if the P key is pressed. Value is true if the key is pressed, false otherwize.


key_Q

public static boolean key_Q
Checks if the Q key is pressed. Value is true if the key is pressed, false otherwize.


key_R

public static boolean key_R
Checks if the R key is pressed. Value is true if the key is pressed, false otherwize.


key_S

public static boolean key_S
Checks if the S key is pressed. Value is true if the key is pressed, false otherwize.


key_T

public static boolean key_T
Checks if the T key is pressed. Value is true if the key is pressed, false otherwize.


key_U

public static boolean key_U
Checks if the U key is pressed. Value is true if the key is pressed, false otherwize.


key_V

public static boolean key_V
Checks if the V key is pressed. Value is true if the key is pressed, false otherwize.


key_W

public static boolean key_W
Checks if the W key is pressed. Value is true if the key is pressed, false otherwize.


key_X

public static boolean key_X
Checks if the X key is pressed. Value is true if the key is pressed, false otherwize.


key_Y

public static boolean key_Y
Checks if the Y key is pressed. Value is true if the key is pressed, false otherwize.


key_Z

public static boolean key_Z
Checks if the Z key is pressed. Value is true if the key is pressed, false otherwize.


key_ANY

public static boolean key_ANY
Checks if ANY key is pressed. Value is true if any key is pressed, false otherwize.

Constructor Detail

RowRead

public RowRead()
Method Detail

enable

public static void enable()
Enable RowRead operation. Saves then disable interupt handlers 1 and 5.


disable

public static void disable()
Disable RowRead operation. Restores interupt handlers 1 and 5.


rowRead

public static ushort rowRead(moka.lang.UShort row)
Handle low level keyboard reading for simultaneous reading of more than one key. This method is hardware dependant, use the key methods to overcome dependance.

Parameters:
row - Setting a bit in row masks the corresponding row of the keyboard from being read, so if row is zero, all rows are read at the same time.
Returns:
a ushort which all bits (cols) corresponding to keys which are being held down are set.

keyTest

public static boolean keyTest(short row,
                              short col)
Handle low level keyboard reading for single keys. This method is hardware dependant, use the key methods to overcome dependance.

Parameters:
row - The row to read.
col - The column to read.
Returns:
true if the key is pressed, false otherwize.