jcontrol.io
Class Keyboard

java.lang.Object
  extended by jcontrol.io.Keyboard

public class Keyboard
extends Object

Accesses JControls keyboard. There are two access modes:

There are device dependent default keyboard to ASCII maps defined, you can change these at runtime using the second constructor.
DeviceStickerSmartDisplayStamp
Layout
'U'
'u'
'S'
'd'
'D'
'U'
'L''S''R'
'D'
'S'
Map{'S','u','U','d','D'} {'U','D','L','R','S'}{'S'}


Constructor Summary
Keyboard()
          Default keyboard initialisation, uses the hard-wired JControl keyboard.
 
Method Summary
protected  void finalize()
          native finalize method
 char getKey()
          Buffered keyboard readout.
 char getRaw()
          Raw keyboard readout.
 char read()
          Default method for reading the keyboard.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, notifyAll, toString, wait
 

Constructor Detail

Keyboard

public Keyboard()
Default keyboard initialisation, uses the hard-wired JControl keyboard. As there is currently only one keyboard supported per device only one instance is allowed.

Method Detail

read

public char read()
Default method for reading the keyboard. Buffered keyboard readout, enables wait for keypress (this method blocks until keypress), automatic key repetition and keyboard beep (optional).

Returns:
the char of the pressed key
See Also:
#get(), getRaw()

getKey

public char getKey()
Buffered keyboard readout. Disables wait for keypress (this method does not block), enables automatic key repetition and keyboard beep (optional).

Returns:
the char of the pressed key or 0 if no key is pressed
See Also:
read(), getRaw()

getRaw

public char getRaw()
Raw keyboard readout. Disables wait for keypress (this method does not block), automatic key repetition and keyboard beep.

Returns:
the char of the currently pressed key or 0 if no key is pressed

finalize

protected void finalize()
native finalize method