Changes

Jump to navigation Jump to search
10 bytes added ,  17:39, 10 August 2009
m
Robot: Cosmetic changes
Line 5: Line 5:  
The device can be opened and closed even without a keyboard connected. Performing an ioctl on the device in this state will simply block forever.
 
The device can be opened and closed even without a keyboard connected. Performing an ioctl on the device in this state will simply block forever.
   −
==Write==
+
== Write ==
 
Writes are used the send commands to the driver. This is for controlling the keyboard LEDs. Writes are always 5 bytes in length.
 
Writes are used the send commands to the driver. This is for controlling the keyboard LEDs. Writes are always 5 bytes in length.
   Line 24: Line 24:  
|}
 
|}
   −
==Ioctl==
+
== Ioctl ==
 
Ioctls are used to read keyboard events. All parameters except the output buffer are ignored. The buffer should be 16 bytes in size and will be filled with the event data. Note that the ioctl is blocking.
 
Ioctls are used to read keyboard events. All parameters except the output buffer are ignored. The buffer should be 16 bytes in size and will be filled with the event data. Note that the ioctl is blocking.
   Line 43: Line 43:  
|}
 
|}
   −
===Message type===
+
=== Message type ===
 
Message type is one of the following:
 
Message type is one of the following:
   Line 59: Line 59:  
You will always be properly notified of available keyboards. This means that when the device is opened ''after'' the keyboard is connected, a keyboard connect event is still received as the very first message.
 
You will always be properly notified of available keyboards. This means that when the device is opened ''after'' the keyboard is connected, a keyboard connect event is still received as the very first message.
   −
===Modifiers===
+
=== Modifiers ===
 
The modifiers are a bitmask of the following:
 
The modifiers are a bitmask of the following:
   Line 96: Line 96:  
|}
 
|}
   −
===Key data===
+
=== Key data ===
 
The key data is an array of bytes with key codes. The codes are probably passed directly from the keyboard as they correspond to the table in the USB HID Usage Tables Chapter 10 (Keyboard/Keypad Page), available [http://www.usb.org/developers/hidpage/ here].
 
The key data is an array of bytes with key codes. The codes are probably passed directly from the keyboard as they correspond to the table in the USB HID Usage Tables Chapter 10 (Keyboard/Keypad Page), available [http://www.usb.org/developers/hidpage/ here].
  
1,189

edits

Navigation menu