lejos.devices
Class Keyboard
java.lang.Object
java.lang.Thread
lejos.devices.Keyboard
public class Keyboard
- extends Thread
This class will only work with SPP keyboards, not standard HID
keyboards. If it doesn't say it supports Bluetooth SPP then it
will not work. There are only two known SPP models (also available
on eBay or Amazon):
Freedom Universal Bluetooth keyboard
http://www.freedominput.com
iTech Virtual Keyboard (SPP only)
http://www.virtual-laser-keyboard.com/
Note: This class is currently only tested with Freedom Universal
Methods inherited from class java.lang.Thread |
currentThread, getPriority, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, setDaemon, setPriority, sleep, start, yield |
Keyboard
public Keyboard(InputStream in,
OutputStream out)
addKeyListener
public void addKeyListener(KeyListener l)
removeKeylistener
public void removeKeylistener(KeyListener l)
getASCII
public static byte getASCII(byte scanCode)
- Converts raw keyboard scan code into ASCII.
Works with lower case only.
- Parameters:
scanCode
-
- Returns:
- the ascii character
run
public void run()
- Specified by:
run
in class Thread