The Generic Keyboard is a simple input device compatible with the DCPU-16. It outputs all the 7-bit, printable ASCII characters, as well as other, non-ASCII key codes (see below).
 Hardware details
|| Generic Keyboard
The Generic Keyboard can perform four interrupts depending on the value of the A register:
|| Clears keyboard buffer.
|| Store the ASCII value of the key in the keyboard buffer to the C register, or 0 if the buffer is empty.
|| Sets the C register to 0x1 if the key specified by the B register is pressed, or to zero if it not pressed.
|| Turns on interrupts with the message specified by the B register, if B is zero it turns off the interrupts.
When interrupts are enabled, the keyboard will trigger an interrupt when one or more keys have been pressed, released, or typed.
 Key values
The Generic Keyboard uses a modified ASCII character set. While the printable characters (aside from return) are the same as in 7-bit ASCII, other keys have non-ASCII key codes:
|| Hexadecimal value
| ASCII characters
|| 0x20 to 0x7F
| Arrow up
| Arrow down
| Arrow left
| Arrow right
 External Links and References