merge
[dcpu16] / docs / keyboard.txt
1 Name: Generic Keyboard (compatible)
2 ID: 0x30cf7406
3 Version: 1
4
5 Interrupts do different things depending on contents of the A register:
6
7 A | BEHAVIOR
8 ---+----------------------------------------------------------------------------
9 0 | Clear keyboard buffer
10 1 | Store next key typed in C register, or 0 if the buffer is empty
11 2 | Set C register to 1 if the key specified by the B register is pressed, or
12 | 0 if it's not pressed
13 3 | If register B is non-zero, turn on interrupts with message B. If B is zero,
14 | disable interrupts
15 ---+----------------------------------------------------------------------------
16
17 When interrupts are enabled, the keyboard will trigger an interrupt when one or
18 more keys have been pressed, released, or typed.
19
20 Key numbers are:
21 0x10: Backspace
22 0x11: Return
23 0x12: Insert
24 0x13: Delete
25 0x20-0x7f: ASCII characters
26 0x80: Arrow up
27 0x81: Arrow down
28 0x82: Arrow left
29 0x83: Arrow right
30 0x90: Shift
31 0x91: Control