lejos.devices
Class Keyboard

java.lang.Object
  extended by java.lang.Thread
      extended by 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


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Keyboard(InputStream in, OutputStream out)
           
 
Method Summary
 void addKeyListener(KeyListener l)
           
static byte getASCII(byte scanCode)
          Converts raw keyboard scan code into ASCII.
 void removeKeylistener(KeyListener l)
           
 void run()
           
 
Methods inherited from class java.lang.Thread
currentThread, getPriority, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, setDaemon, setPriority, sleep, start, yield
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

Keyboard

public Keyboard(InputStream in,
                OutputStream out)
Method Detail

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