DOS/Windows Keyboard Keycode Sequences ====================================== Sorted by keycode When a DOS character I/O function returns a character of 00H or E0H, you should make a second call to obtain the extended ASCII value. 00 prefix +----+------+------+------+------+------------+------------+------+------------+------------+-----------+------+-----+----+ | | 0x | 1x | 2x | 3x | 4x | 5x | 6x | 7x | 8x | 9x | Ax | Bx | | +----+------+------+------+------+------------+------------+------+------------+------------+-----------+------+-----+----+ | x0 | Break| aQ | aD | aB | F6 | sK2 (Down) | cF3 | aF9 | a9 | cK+ | aDn |sjWDT| x0 | | x1 | aEsc | aW | aF | aN | F7 | sK3 (PgDn) | cF4 | aF10 | a0 | cK2 (cDn) | aPgDn|cjWDT| x1 | | x2 | | aE | aG | aM | F8 | sK0 (Ins) | cF5 | cPrt | a- | cK0 (cIns)| aIns |ajWDT| x2 | | x3 | c2 | aR | aH | a, | F9 | sK. (Del) | cF6 | cK4 (c<-) | a= | cK. (cDel)| aDel | jCAP| x3 | | x4 | | aT | aJ | a. | F10 | sF1 | cF7 | cK6 (c->) | cK9 (cPgUp)| cTab | aK/ |cjCAP| x4 | | x5 | | aY | aK | a/ | (Num) | sF2 | cF8 | cK1 (cEnd) | F11 | cK/ | aTab |ajCAP| x5 | | x6 | | aU | aL |(RShf)| (Scroll) | sF3 | cF9 | cK3 (cPgDn)| F12 | cK* |aKEntr| jKAN| x6 | | x7 | | aI | a;: | aK* | sK7 (Home) | sF4 | cF10 | cK7 (cHome)| sF11 | aHome | jHEN |sjKAN| x7 | | x8 | | aO | a'@ | (Alt)| sK8 (Up) | sF5 | aF1 | a1 | sF12 | aUp |sjHEN |cjKAN| x8 | | x9 | | aP | a` | (Spc)| sK9 (PgUp) | sF6 | aF2 | a2 | cF11 | aPgUp |cjHEN |ajKAN| x9 | | xA | | a[ |(LShf)|(Caps)| aK- | sF7 | aF3 | a3 | cF12 |(aK-) |ajHEN | | xA | | xB | | a] |a\| a#~ F1 | sK4 (Left) | sF8 | aF4 | a4 | aF11 | a<- | jMUH | | xB | | xC | |aEnter| aZ | F2 | sK5 | sF9 | aF5 | a5 | aF12 |(aK5) |sjMUH | | xC | | xD | |(ctrl)| aX | F3 | sK6 (Right)| sF10 | aF6 | a6 | cK8 (cUp) | a-> |cjMUH | | xD | | xE | aBS | aA | aC | F4 | aK+ | cF1 | aF7 | a7 | cK- |(aK+) |ajMUH | | xE | | xF | sTab | aS | aV | F5 | sK1 (End) | cF2 | aF8 | a8 | cK5 | aEnd | jWDT | | xF | +----+------+------+------+------+------------+------------+------+------------+------------+-----------+------+-----+----+ E0 prefix +----+------+------+------+------+------------+------------+------+------------+------------+-----------+------+-----+----+ | | 0x | 1x | 2x | 3x | 4x | 5x | 6x | 7x | 8x | 9x | Ax | Bx | | +----+------+------+------+------+------------+------------+------+------------+------------+-----------+------+-----+----+ | x0 | | | | | | Down sDown | | | | | | | x0 | | x1 | | | | | | PgDn sPgDn | | | | cDown | aPgDn| | x1 | | x2 | | | | | | Ins sIns | | | | cIns | aIns | | x2 | | x3 | | | | | | Del sDel | | c<- | | cDel | aDel | | x3 | | x4 | | | | | | | | c-> | cPgUp | | | | x4 | | x5 | | | | | | | | cEnd | | | | | x5 | | x6 | | | | | | | | cPgDn | cPgUp | | | | x6 | | x7 | | | | | Home sHome | | | cHome | | aHome | | | x7 | | x8 | | | | | Up sUp | | | | | aUp | | | x8 | | x9 | | | | | PgUp sPgUp | | | | | aPgUp | | | x9 | | xA | | | | | | | | | | aDn | | | xA | | xB | | | | | <- s<- | | | | | a<- | | | xB | | xC | | | | | | | | | | | | | xC | | xD | | | | | -> s-> | | | | cUp | a-> | | | xD | | xE | | | | | | | | | | | | | xE | | xF | | | | | End sEnd | | | | | aEnd | | | xF | +----+------+------+------+------+------------+------------+------+------------+------------+-----------+------+-----+----+