-
Notifications
You must be signed in to change notification settings - Fork 2
AT PS2 Command Set
Adam edited this page Nov 21, 2022
·
4 revisions
The biggest difference between AT and XT keyboards is that the host can talk to the AT keyboard using bidirectional serial clock and data lines. Now that the host can talk to the keyboard; they used that to implement a short list of functions that was later expanded upon with PS/2 keyboards.
This adapter aims to support several of this functions though not all. It is worth noting that some keyboard controllers do not support every function and instead just mimics a keyboard acknowledge signal without talking to the keyboard.
Using this PDF as a reference: https://www.tayloredge.com/reference/Interface/atkeyboard.pdf Here is a list of the command set commands and whether or not they are supported by this adapter
Hex | Description | Implemented | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0xFF |
Reset Causes keyboard to enter "Reset" mode. |
✔️ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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. |
❌ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xFD |
Set Key Type Make (PS/2 keyboards) 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. |
❌ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xFC |
Set Key Type Make/Break (PS/2 keyboards) Similar to "Set Key Type Make", but both make codes and break codes are enabled (typematic is disabled.) |
❌ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xFB |
Set Key Type Typematic (PS/2 keyboards) Similar to previous two commands, except make and typematic is enabled; break codes are disabled. |
❌ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xFA |
Set All Keys Typematic/Make/Break (PS/2 keyboards) 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.) |
❌ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xF9 |
Set All Keys Make (PS/2 keyboards) Causes only make codes to be sent; break codes and typematic repeat are disabled for all keys. |
❌ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xF8 |
Set All Keys Make/Break (PS/2 keyboards) Similar to previous two commands, except only typematic repeat is disabled. |
❌ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xF7 |
Set All Keys Typematic (PS/2 keyboards) Similar to previous three commands, except only break codes are disabled. Make codes and typematic repeat are enabled. |
✔️ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xF6 |
Set Default Load default typematic rate/delay (10.9cps / 500ms), key types (all keys typematic/make/break), and scan code set (2). |
✔️ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xF5 |
Disable Keyboard stops scanning, loads default values (see "Set Default" command), and waits further instructions. |
✔️ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xF4 |
Enable Re-enables keyboard after disabled using previous command. |
✔️ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xF3 |
Set Typematic Rate/Delay Host follows this command with one argument byte that defines the typematic rate (CPS) and delay as follows: (Note: the PDF linked above has this table backwards which is incorrect)
|
✔️ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xF2 |
Read ID (PS/2 keyboards) The keyboard responds by sending a two-byte device ID of 0xAB, 0x83. |
✔️ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xF0 |
Set Scan Code Set (PS/2 keyboards) 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. |
✔️ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
0xEE |
Echo The keyboard responds with "Echo" (0xEE). |
✔️ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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: |
✔️ |