IBM PC Keyboard Scan Codes For many of the special key combinations such as ALT-A, F1, PgUp, and so forth, the IBM PC uses a special two-character escape sequence. Depending on the programming language being used and the level at which the keyboard is being accessed, the escape character is either ESC (27, 0x1B), or NUL (0). 20 Transmit keyboard controller’s command byte to system as a scan code at port 60h. 60 The next byte written to port 60h will be stored in the keyboard controller’s command byte.
Keyboard Scan CodesKeyboard Scan Codesautosonnenschutz v70 Volvo.PC Keyboard Scan Codes News: now on-lineYou can now determine specific Keyboard Scancodes and sequences withoutthe need to look them up individually in a table and assemble them by hand. Just clickon the keys and cut and paste the results.Note dated January 2003 The XT scancodes and the 84 key keyboard mentioned in the following text refer toobsolete equipment. There may be some special purpose equipment stillusing XT codes? Some Electronic PC board level products were known to use XT codesmaybe some still do?It’s easy to get confused over scancodes because the AT scancodesused at the hardware level are converted by the PC Bios into XT codes. If youare an engineer looking at the keyboard bus lines with a ’scope or'Reverse Mule' analysis unit you will likely see AT style scancodes. But ifyou are a programmer you will probably be dealing with XT codes.
This isto maintain backward compatibility with the earliest PCs of the mid 1980s.If anyone knows of any equipment still using XT codes at the hardware level.Since this page was first written six new keys have been added to the originalkeyboards.The scancodes for these keys can be found at the foot of this page.can emulate ALLthe new keys.All the scancodes published here have been verified withandare known to be accurate. Data published elsewhere is often seen to contain errors.Please do not copy this data into another medium or web site. It is maintainedup to date here and we strictly enforce our copyrights. We are happy forany site to link here.OverviewThe PC keyboard interface is designed so the system software has maximum flexibility in defining certainkeyboard operations. This is accomplished by having the keyboard return scancodes rather than ASCII codes.Each key generates a 'make' scancode when pressed and a 'break' scancode when released. The computersystem interprets the scancodes to determine what operation it is to perform. For historical compatibility reasonscomputers can employ different sets of scancodes for different purposes.
Earlier PC computers tend to use the XTscancode set. Current PC computers tend to use the AT scancode set. The MF1, MF2 and MF3 sets are alternatives,similar in many respects to the XT and AT sets. The table below shows the scancodes generated when a key ispressed- the 'make' code. The 'break' code may be derived from the 'make' code as described later. Noticethat scancodes may consist of a single or several bytes.
Nuru massage midtown: best nuru massage.Many keyboard scancode tables published are not completely accurate. Confusion arises betweenscancodes issued by the keyboard hardware and the scancodes appearing in the keyboard buffer. Thescancodes presented here are those actually sent by the keyboard hardware. The computer BIOSmay translate the code for compatibility reasons.
![Keyboard Keyboard](http://blogthumb2.naver.net/20110901_204/utimegps_1314877041746oHrqi_PNG/Fig_F_01.png?type=w2)
For example, the XT scancode set was first usedin the original IBM PC computer. Other IBM computers and terminals used a different scancode set. ApparentlyIBM tried to bring the PC into line with its other products when the IBM PC/AT was launched.The keyboard for that machine used a scancode set virtually identical to other IBM machines.However to maintain compatibility with earlier PC software the BIOS for the AT machinesconverted the AT scancodes into the earlier XT scancodes. At the current time (June 1995) thissystem of code conversion in the BIOS persists. The code you read from the keyboard buffer is notnecessarily the same code transmitted from the keyboard.How to Calculate the Scancode.
Use the keyboard sketches to determine the 'Key Number'. Note that the 102 key keyboardshown is the keyboard used in the UK. In the USA and some other countries a 101 key keyboardis used- there are minor scancode differences- read the table notes. Lookup the 'Key number' in the table and read of the 'Make'scancode. Note that the scancodediffers depending on the scancode set currently in use. Note also that some scancodesconsist of more than 1 byte. Calculate the 'break' scancode as detailed below'Break' scancodes for PC/XT computersThe 'break' code for XT style computers is the 'Make' code OR’d with the hexadecimalvalue 80.
(If you are unfamiliar with hexadecimal numbers then simply change the firstcharacter of the scancode thus: Change 0 to 8, 1 to 9, 2 to A, 3 to B, 4 to C, 5 to D,6 to E, 7 to F)For example the scancodes generated by pressing and releasing the Escape key (Key Number 110)are 01 81 'Break' scancodes for PC/AT computersMost PC’s made since about 1989 use keyboards that generate AT scancodes (Though the codesmay be converted to XT scancodes in the BIOS). The 'break' code for AT class scancodes issimply the 'make' code preceded by hex F0. For example the scancodes generated when the Escapekey is pressed and released are 76 F0 76.Special scancodes of potential interest to Altek Mule™ usersIf the keyboard’s buffer overflows it sends a special scancode to the computer. Thisgenerally causes the computer to sound a warning beep. Altek Mule(tm) users may issue this codeif they want to sound the beep to draw the operators attention.For computers using AT scancodes the code is 00. (For obsolete PCs using XT scancodesthe code was hex FF)PC Keyboard, 102 key PC Keyboard, 84 keyScancode Table Table Notes.
The Scancode values in this table are hexadecimal. Some key numbers are unallocated or reserved.
The XT codes are obsolete.