Changes

Jump to navigation Jump to search
10 bytes added ,  17:39, 10 August 2009
m
Robot: Cosmetic changes
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==
Writes are used the send commands to the driver. This is for controlling the keyboard LEDs. Writes are always 5 bytes in length.
|}
==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.
|}
===Message type===
Message type is one of the following:
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===
The modifiers are a bitmask of the following:
|}
===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].
1,189

edits

Navigation menu