PS/2 Scan Codes Set 2 ===================== Codes Received from Keyboard +--------------------+--------------------+--------------------+----------------------+ | KEY MAKE BREAK | KEY MAKE BREAK | KEY MAKE BREAK | KEY MAKE BREAK | +--------------------+--------------------+--------------------+----------------------+ | no key 00 | 20 | 40 | 60 | | F9 01 F0,01 | C 21 F0,21 | , 41 F0,41 | UKBACKSPC 61 F0,61 | | 02 | X 22 F0,22 | K 42 F0,42 | Furigana 62 F0,62 | | F5 03 F0,03 | D 23 F0,23 | I 43 F0,43 | 63 | | F3 04 F0,04 | E 24 F0,24 | O 44 F0,44 | Kanji/ | | | | | Convert 64 F0,64 | | F1 05 F0,05 | 4 25 F0,25 | 0 45 F0,45 | 65 | | F2 06 F0,06 | 3 26 F0,26 | 9 46 F0,46 | BACKSPC 66 F0,66 | | F12 07 F0,07 | 27 | 47 | Hiragana/ | | | | | NoConvert 67 F0,67 | | 08 | 28 | 48 | 68 | | F10 09 F0,09 | SPACE 29 F0,29 | . 49 F0,49 | KP 1 69 F0,69 | | F8 0A F0,0A | V 2A F0,2A | / 4A F0,4A | INT4: Yen 6A F0,6A | | F6 0B F0,0B | F 2B F0,2B | L 4B F0,4B | KP 4 6B F0,6B | | F4 0C F0,0C | T 2C F0,2C | ; 4C F0,4C | KP 7 6C F0,6C | | TAB 0D F0,0D | R 2D F0,2D | P 4D F0,4D | (INT5) 6D F0,6D | | ` 0E F0,0E | 5 2E F0,2E | - 4E F0,4E | 6E | | 0F | 2F | 4F | 6F | | 10 | 30 | 50 | KP 0 70 F0,70 | | L ALT 11 F0,11 | N 31 F0,31 | INT3: \_ 51 F0,51 | KP . 71 F0,71 | | L SHIFT 12 F0,12 | B 32 F0,32 | ' 52 F0,52 | KP 2 72 F0,72 | | Katakana/ | | | | | Kana 13 F0,13 | H 33 F0,33 | 53 | KP 5 73 F0,73 | | L CTRL 14 F0,14 | G 34 F0,34 | [ 54 F0,54 | KP 6 74 F0,74 | | Q 15 F0,15 | Y 35 F0,35 | = 55 F0,55 | KP 8 75 F0,75 | | 1 16 F0,16 | 6 36 F0,36 | 56 | ESC 76 F0,76 | | 17 | 37 | 57 | NUMLOCK 77 F0,77 | | 18 | 38 | CAPS 58 F0,58 | F11 78 F0,78 | | 19 | 39 | R SHFT 59 F0,59 | KP + 79 F0,79 | | Z 1A F0,1A | M 3A F0,3A | ENTER 5A F0,5A | KP 3 7A F0,7A | | S 1B F0,1B | J 3B F0,3B | ] 5B F0,5B | KP - 7B F0,7B | | A 1C F0,1C | U 3C F0,3C | 5C | KP * 7C F0,7C | | W 1D F0,1D | 7 3D F0,3D | \ 5D F0,5D | KP 9 7D F0,7D | | 2 1E F0,1E | 8 3E F0,3E | 5E | SCROLL 7E F0,7E | | 1F | 3F | 5F | 7F | +--------------------+--------------------+--------------------+----------------------+ | 80 | extend E0,... | release F0,... | F8 | | 81 | BREAK E1,... | F1 | F9 | | 82 | | F2 | Ack FA | | F7 83 F0,83 | | F3 | FB | | | | F4 | Error FC | | | | F5 | Failure FD | | BAT Ok AA | Echo Ok EE | F6 | No Ack FE | | | | F7 | Error FF | +--------------------+--------------------+--------------------+----------------------+ | R ALT E0,11 E0,F0,11 | KP / E0,4A E0,F0,4A | INSERT E0,70 E0,F0,70 | | PRINT E0,12+ E0,F0,12 | KP EN E0,5A E0,F0,5A | DELETE E0,71 E0,F0,71 | | R CTRL E0,14 E0,F0,14 | END E0,69 E0,F0,69 | D ARROW E0,72 E0,F0,72 | | L GUI E0,1F E0,F0,1F | L ARROW E0,6B E0,F0,6B | R ARROW E0,74 E0,F0,74 | | R GUI E0,27 E0,F0,27 | HOME E0,6C E0,F0,6C | U ARROW E0,75 E0,F0,75 | | APPS E0,2F E0,F0,2F | | PG DN E0,7A E0,F0,7A | | | PRINT +E0,7C +E0,F0,7C | | | PG UP E0,7D E0,F0,7D | | | PAUSE E0,7E E0,F0,7E | +--------------------+--------------------+--------------------+----------------------+ | PRINT MAKE=E0,12,E0,7C BREAK=E0,F0,7C,E0,F0,12 (E0,12 sometimes not sent) | BREAK MAKE=E1,14,77,E1,F0,14,F0,77 no break sequence +--------------------+--------------------+--------------------+---------------------+ WEB SEARCH E0,10 E0,F0,10 PREV TRACK E0,15 E0,F0,15 WEB FAVOURTIES E0,18 E0,F0,18 WEB REFRESH E0,20 E0,F0,20 VOLDN E0,21 E0,F0,21 WEB STOP E0,28 E0,F0,28 CALC E0,2B E0,F0,2B MUTE E0,23 E0,F0,23 WEB FORWARD E0,30 E0,F0,30 VOLUP E0,32 E0,F0,32 PLAY E0,34 E0,F0,34 POWER E0,37 E0,F0,37 WEB BACK E0,38 E0,F0,38 WEB HOME E0,3A E0,F0,3A STOP E0,3B E0,F0,3B SLEEP E0,3F E0,F0,3F MY COMPUTER E0,40 E0,F0,40 EMAIL E0,48 E0,F0,48 NEXT TRACK E0,4D E0,F0,4D SELECT E0,50 E0,F0,50 WAKE E0,5E E0,F0,5E Codes Sent to Keyboard +-------------------+-------------------+-------------------+-------------------+ 0xED (Set/Reset LEDs) - The host follows this command with one argument byte, that specifies the state of the keyboard's Num Lock, Caps Lock, and Scroll Lock LEDs. This argument byte is defined as follows 0xEE (Echo) - The keyboard responds with "Echo" (0xEE). *0xF0 (Set Scan Code Set) - Host follows this command with one argument byte, that specifies which scan code set the keyboard should use. This argument byte may be 0x01, 0x02, or 0x03 to select scan code set 1, 2, or 3, respectively. You can get the current scan code set from the keyboard by sending this command with 0x00 as the argument byte. *0xF2 (Read ID) - The keyboard responds by sending a two-byte device ID of 0xAB, 0x83. 0xF3 (Set Typematic Rate/Delay) - Host follows this command with one argument byte that defines the typematic rate and delay as follows: 0xF4 (Enable) - Re-enables keyboard after disabled using previous command. 0xF5 (Disable) - Keyboard stops scanning, loads default values (see "Set Default" command), and waits further instructions. 0xF6 (Set Default) - Load default typematic rate/delay (10.9cps / 500ms), key types (all keys typematic/make/break), and scan code set (2). *0xF7 (Set All Keys Typematic) - Similar to previous three commands, except only break codes are disabled. Make codes and typematic repeat are enabled. *0xF8 (Set All Keys Make/Break) - Similar to previous two commands, except only typematic repeat is disabled. *0xF9 (Set All Keys Make) - Causes only make codes to be sent; break codes and typematic repeat are disabled for all keys. *0xFA (Set All Keys Typematic/Make/Break) - Default setting. Make codes, break codes, and typematic repeat enabled for all keys (except "Print Screen" key, which has no break code in sets 1 and 2.) *0xFB (Set Key Type Typematic) - Similar to previous two commands, except make and typematic is enabled; break codes are disabled. *0xFC (Set Key Type Make/Break) - Similar to "Set Key Type Make", but both make codes and break codes are enabled (typematic is disabled.) *0xFD (Set Key Type Make) - Allows the host to specify a key that is to send only make codes. This key will not send break codes or typematic repeat. This key is specified by its set 3 scan code. 0xFE (Resend) - This is used to indicate an error in reception. Keyboard responds by resending the last scan code or command response sent to the host. However, 0xFE is never sent in response to a "Resend" command. 0xFF (Reset) - Causes keyboard to enter "Reset" mode. (See "Reset" section.)