Keyboard Scan Code Specification: Windows Platform Design Notes
Keyboard Scan Code Specification: Windows Platform Design Notes
Abstract: This specification details the PS/2 Scan Codes and USB Usage Tables that are validated for
compliance to the Microsoft® Windows® Logo Program testing standard. This document details the
alternative make and break PS/2 scan code and USB code response for the Windows Logo Key and
Application Keys, plus Advanced Configuration and Power Interface (ACPI) power controls.
This specification was previous published, with the same content, as “Windows Hardware Quality Labs
Keyboard Specification” and also referred to as “Windows Keys Specification” and “New Keys
Specification.”
Revision 1.3a — March 16, 2000
Disclaimer: The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the
date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of
Microsoft, and Microsoft cannot guarantee the accuracy of any information presented. This document is for informational purposes only.
MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT.
Microsoft Corporation may have patents or pending patent applications, trademarks, copyrights, or other intellectual property rights covering
subject matter in this document. The furnishing of this document does not give you any license to the patents, trademarks, copyrights, or other
intellectual property rights except as expressly provided in any written license agreement from Microsoft Corporation.
Microsoft does not make any representation or warranty regarding specifications in this document or any product or item developed based on
these specifications. Microsoft disclaims all express and implied warranties, including but not limited to the implied warranties or merchantability,
fitness for a particular purpose and freedom from infringement. Without limiting the generality of the foregoing, Microsoft does not make any
warranty of any kind that any item developed based on these specifications, or any portion of a specification, will not infringe any copyright, patent,
trade secret or other intellectual property right of any person or entity in any country. It is your responsibility to seek licenses for such intellectual
property rights where appropriate. Microsoft shall not be liable for any damages arising out of or in connection with the use of these specifications,
including liability for lost profit, business interruption, or any other damages whatsoever. Some states do not allow the exclusion or limitation of
liability or consequential or incidental damages; the above limitation may not apply to you.
Microsoft, Win32, Windows, and Windows NT are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other
countries. Other product and company names mentioned herein may be the trademarks of their respective owners.
© 1996-2000 Microsoft Corporation. All rights reserved.
Keyboard Scan Code Specification — 2
Contents
Windows Keys Support for Windows Software Applications.............................................4
Key Codes for Scan Code Set 1:..................................................................................4
Key Codes for Scan Code Set 2:..................................................................................4
Key Codes for USB Usage Tables:..............................................................................4
What Software Applications Vendors Should Support and How.................................4
Windows Logo Key Support (Reserved for Operating System Use)...........................5
Windows Keys Support for OEMs and Keyboard IHVs.....................................................6
Software Support of the Windows Keys in the Windows 95/98 Operating System.....6
Special Keys Reserved for OEM Usage......................................................................6
Multiple Key Operation Requirements...............................................................................7
Valid 2-Key Combinations.............................................................................................7
Valid 3-Key Combinations.............................................................................................8
Combinations of 3-Keys which are Unavailable...........................................................8
Additional General Requirements......................................................................................9
LWIN and RWIN Keys as modifiers..............................................................................9
Building a Keyboard with the Windows Keys....................................................................9
Tools Needed to Build a Keyboard with the Windows Keys........................................9
Microsoft Windows Legal Agreements.........................................................................9
Steps to Ship a Keyboard with the Windows Logo Keys...........................................10
ACPI Power Management Keys......................................................................................11
Key Codes for Scan Code Set 1:................................................................................11
Key Codes For Scan Code Set 2:...............................................................................11
Key Codes for USB Usage Tables:............................................................................12
Usage Page and Usages for Audio Control.....................................................................12
Important Design Aspects................................................................................................13
Sample Firmware Designs...............................................................................................14
Appendix A: Windows Standard PS/2 Scan Codes........................................................15
General Requirements................................................................................................15
Typematic Characteristics...........................................................................................15
Scan Code Assignments:............................................................................................15
Additional General Requirements...............................................................................16
Appendix B: Device Class Power Management v1.0a....................................................16
Scope..........................................................................................................................16
General Device Power Management Considerations................................................16
Input Device Power State Definitions.........................................................................16
Input Device Power Conservation Policy...................................................................16
Input Device Wake-up Events....................................................................................16
Minimum Input Device Power Capabilities.................................................................16
Recommendations for Human Interface Devices.......................................................16
Recommendations for i8042 keyboards.....................................................................16
Appendix C: USB Keyboard/Keypad Page (0x07)..........................................................16
Footnotes.....................................................................................................................16
Notice of Change
This version of the Keyboard Scan Code Specification details the PS/2 Scan Codes and USB Usage
Tables that are validated for compliance to the Microsoft Windows Logo Program testing standard.
This document details the alternative make and break PS/2 scan code and USB code response for
the Windows Logo key, Application Keys, and Advanced Configuration & Power Interface (ACPI)
power controls.
/
This document supercedes all versions of the New Keys Specifications for the Windows Keys and
Windows Hardware Quality Labs WHQL Keyboard Specification. There is no change required for
developers of Windows-based applications to support any compatible implementation.
***IMPORTANT ***
As of August 1, 1996, your keyboard must pass the Windows keyboard testing at the
Windows Hardware Quality Labs either prior to, or in conjunction with, the Windows Key
Logo testing.
The requirements for compatibility testing are not changed, and a keyboard vendor can implement
these new keys successfully following the 1.0, 1.1, or 1.2 versions of the New Keys Specification.
There is no change required for developers of Windows-based applications to support any compatible
implementation.
Revision History
Applications vendors are encouraged to extend their support beyond the application key to include
support for application key combinations like CTRL+Application, ALT+Application and
SHIFT+Application. These key combinations are reserved for applications to support. Support for
Windows+Application is reserved for the operating system.
Using the Windows Logo Key Logo and Application Key Logo in
Documentation
The Windows Logo key and the Application Logo key may be used by OEMs, ISVs and IHVs in
documentation that describes the functionality of the Logo keys, provided such description is
consistent with Microsoft’s guidelines for use of the Logo keys.
• It is not necessary to obtain a Logo license from Microsoft in order to refer to the Logo keys in
documentation. This is the only permissible non-licensed use of the Windows Logo.
• The Logos may not be used in any way other than as specified in the Logo license guidelines.
• Upon request, Microsoft will provide camera-ready artwork of the Logos to be used in
documentation. Send your e-mail request to Microsoft Windows Hardware Quality Labs at
[email protected] with “Artwork Request” in your subject line. Alternatively, you may use
the Windows flag symbol provided in the “Wingdings®” font. This character is available by
pressing ALT + 0255 on the numeric keypad.
• You may not alter the Logos in any way.
• The Logos should be typed with an empty space before and after each symbol, followed by a plus
sign and another space, followed by the modifier if appropriate. Examples are shown:
Windows Logo key + B or ÿ + B
Application key + S or + + S
Key Event Supported Windows Support Application Support OEM System Utilities
Windows Logo Key open the Start menu
Windows Logo key 9 shortcut functions Win + 1-0 reserved for
Combinations OEM
Application Logo Key context menu on context menu on context menu on selection
selection selection
CTRL, ALT, varies by application varies by utility
SHIFT+Application
LWIN
RWIN
LCTRL
RCTRL
LSHIFT
RSHIFT
LALT
RALT
Valid Final Keys
The following table lists the final keys that are required to work for valid two and three key
combinations. Any key from the Valid 2-Key Combinations list combined with any key from the table
below must work properly. Any 2 keys indicated in a row from the Valid 3-Key Combinations table
combined with any key from the table below must work properly. Exceptions to this requirement are
listed in Combinations of 3-Keys which are unavailable. Invalid key combinations will generate a Key
Error code.
- ‘ Numeric +
= z Numeric Enter
Backspace x Numeric .
excluded from the above tables. These 3-key combinations are not required to work, but may do so
at the keyboard manufacturer’s discretion.
st nd rd
1 Key 2 Key 3 Key
LWIN RWIN Up Arrow
How to Get the WHQL Keyboard Test Kit and Keys Specification
The latest version of the Keyboard Scan Code Specification is available at
http://www.microsoft.com/hwdev/desinit/scancode.htm.
The latest version of the WHQL Keyboard Test Kit is available electronically directly from the
Windows Hardware Quality Labs Web Site at http://www.microsoft.com/hwtest/testkits/. You will need
to individually download the Test Procedures and Test Tools document.
Note: The following WHQL legal agreements, previously available through the Microsoft FAX Service, can
now be downloaded from the WHQL web site at http://www.microsoft.com/hwtest/testkits/ :
Microsoft Windows Logo License Agreement - "Exhibit A5" (Windows Logo Agreement.tif)
Testing Agreement (Testing Agreement.tif)
"Exhibit A" of the Testing Agreement (Exhibit A.tif)
If you are unable to open these agreements, please send e-mail to [email protected] with
AGREEMENT REQUEST in the Subject line.
Send blank e-mail to the auto reply at [email protected] for a complete list of administrative
contacts.
Compatibility Requirement
1. Keyboards are required to be compatible at the Windows virtual key code level. You can
accomplish this by either:
a) Developing a keyboard with the electronics and firmware that comply with the
specification or by,
b) Developing a software driver for use with Windows 3.1 and Windows 95 that maps the
proper virtual key codes to keyboard events on your keyboard.
2. Test your implementation using the WHQL Keyboard Test Procedures to ensure that single-key,
two-key and three-key combinations work correctly, including the Windows Logo keys (if
implemented) and report the proper virtual scan codes in Windows.
3. Once you are satisfied that your keyboard passes the tests, run the full Test Suite and use it to
generate log files of encoded test results that must be included with the other information
required for your Test Submission. Full testing instructions are provided in the WHQL Keyboard
Test Procedures.
Retest Requirements
Any time that you implement the Windows Keys on a new keyboard technology, you must go through
this testing and certification procedure. You will also need to submit a retest any time that you change
the key layout or the BIOS firmware on a certified keyboard.
The two Windows Logo Keys are not distinguished individually by the Microsoft Windows 95
operating system and the IntelliType software only uses a Left Windows Logo key + Right Windows
Logo key press for the Logon/Logoff function.
Design Requirements:
The Windows Logo Key needs to function as a modifier key (CTRL, SHIFT and ALT).
There can be no other icons or words associated with the Windows Flag trademark on the
keycap.
Design Options:
There do not need to be Left and Right Windows Logo keys to get full functionality in Windows
95.
The Application key can be a dual function key and can be used to replace the Fn. key.
The Volume, Bass, and Treble usages (of type LC) should be deployed for controls that generate
both increment and decrement data represented by a 2-bit value, whereas the associated Increment
and Decrement usages (of type RTC) should be deployed for pairs of one-bit controls (traditional
button controls). The hardware design and implementation determines what usage types are
appropriate for the HID firmware implementation for a particular device.
It's also important to notice that any re-triggering of events should be done by software timers in the
host system, and not by hardware timers in the device itself. For example, if the user keeps pressing
the Volume Increment button, the device should only generate one input report with this state
information. Host software will perform the actual re-triggering of events that will lead to continuous
increments of the volume until the device generates another input report indicating that the button
has been released or until the maximum volume has been reached.
Affect audio playback only. There's no support for HID-based controls that affect audio recording,
etc.
Affect audio playback by the default system audio device (same device as sndvol32.exe
controls).
Should be declared right beneath the top-level application collection in the HID firmware in order
to be discovered and utilized by the host system. Important: do not wrap these controls in sub-
collections.
Sample 1.
Usage Page (Consumer)
Usage (Consumer Control)
Collection (Application)
Usage (Volume)
Logical Minimum (-1)
Logical Maximum (1)
Report Size (2)
Report Count (1)
Input (Data, Variable, Relative, Preferred)
Usage (Mute)
Logical Minimum (0)
Logical Maximum (1)
Report Size (1)
Report Count (1)
Input (Data, Variable, Relative, Preferred)
Report Count (5)
Input (Constant)
End Collection
Sample 2.
Usage Page (Consumer)
Usage (Consumer Control)
Collection (Application)
Logical Minimum (0)
Logical Maximum (1)
Usage (Volume Increment)
Usage (Volume Decrement)
Report Size (1)
Report Count (2)
Input (Data, Variable, Absolute, Preferred)
Usage (Mute)
Report Count (1)
Input (Data, Variable, Relative, Preferred)
Report Count (5)
Input (Constant)
End Collection
General Requirements
This keyboard must be downward compatible with an enhanced type 101 keyboard. This keyboard
must be fully compatible with the PS/2 Keyboard Controller command set. It must support Scan Set
2. Three additional scan codes are to be generated from the three Windows Keys (Left Windows,
Right Windows, and Application).
The virtual key codes described in the following tables are specifically for Windows operation only
and are not generated by the keyboard directly. The keyboard manufacturer will need to provide a
Windows Logo keyboard driver to support the three virtual keys for use with the Windows v. 3.1
operating system (not required for Logo purposes). The support will be built into drivers shipped with
future versions of the Windows and Windows NT operating systems.
Typematic Characteristics
Typematic is the term used for keys that will automatically repeat after a specified time delay. In scan
code 1 and scan code 2, key 126 is the only key that is not Typematic. (This key is the only one that
does not send a break code as well).
The following recommendations are made for those who wish to define a new scan code for a
proprietary purpose. It is the manufacturer’s responsibility to implement a software driver that
supports any such scan codes. New scan codes must not be chosen from those currently recognized
by the operating system. Keys that are called out with a Key Number or Key Name in the Scan Code
Table are currently recognized by and used by the operating system.
Avoid Set 1 scan codes above 0x79, since the release (key up) code would be 0xFA or greater,
and the keyboard driver is known to interpret such values as responses from the 8042 chip, not as
keystrokes (scan codes). Specifically, 0x7A, 0x7E and 0x7F are problematic for the Windows NT
keyboard driver in 3.51 and 4.0 since 0xFE is RESEND, 0xFA. is ACKNOWLEDGE and 0xFF seems
to be simply just swallowed up. The effect is that key releases would be lost, and error logs fill up.
1
This mode is set by issuing a 0xF0 command byte to the keyboard, and turning the translate bit
(0x40) in the 8042 command byte on. On Intel and Power PC machines, it is the firmware that
initializes the keyboard and 8042 chip this way, while Windows NT® explicitly sets this mode for
MIPS and Alpha.
In the very early days of Windows NT®, an attempt was made to use the much more orthogonal
Scan Code Set 3, but due to bugs in the implementation of this Scan Code Set on numerous OEM
keyboards, the idea was abandoned.
Avoid 0x60 and 0x61, since the release (up key) code would be 0xE0 and 0xE1, which are
reserved prefix bytes.
Avoid 0x00, since that is likely to have some special meaning to code from driver level through
to application level.
If you use scan codes from the 0xE0 set, make sure the second byte is suitable in the same way as
single byte scan code values. In other words:
Not greater than 0x79
Not 0x60 or 0x61
Not 0x00
key 101/102 Enhanced scan 1 make scan 1 break scan 2 make scan 2 brake
location Keyboard
DO NOT USE 00 80 00 F0 00
DO NOT USE E0_00 E0_80 E0_00 E0_F0 00
1 ~ ` 29 A9 0E F0 0E
E0_29 E0_A9 E0_0E E0_F0 0E
2 ! 1 02 82 16 F0 16
E0_02 E0_82 E0_16 E0_F0 16
3 @ 2 03 83 1E F0 1E
E0_03 E0_83 E0_1E E0_F0 1E
4 # 3 04 84 26 F0 26
E0_04 E0_84 E0_26 E0_F0 26
5 $ 4 05 85 25 F0 25
E0_05 E0_85 E0_25 E0_F0 25
6 % 5 06 86 2E F0 2E
E0_06 E0_86 E0_2E E0_F0 2E
7 ^ 6 07 87 36 F0 36
E0_07 E0_87 E0_36 E0_F0 36
8 & 7 08 88 3D F0 3D
E0_08 E0_88 E0_3D E0_F0 3D
9 * 8 09 89 3E F0 3E
E0_09 E0_89 E0_3E E0_F0 3E
10 ( 9 0A 8A 46 F0 46
E0_0A E0_8A E0_46 E0_F0 46
11 ) 0 0B 8B 45 F0 45
E0_0B E0_8B E0_45 E0_F0 45
12 _ - 0C 8C 4E F0 4E
E0_0C E0_8C E0_4E E0_F0 4E
13 + = 0D 8D 55 F0 55
E0_0D E0_8D E0_55 E0_F0 55
key 101/102 Enhanced scan 1 make scan 1 break scan 2 make scan 2 brake
location Keyboard
15 Backspace 0E 8E 66 F0 66
E0_0E E0_8E E0_66 E0_F0 66
16 Tab 0F 8F 0D F0 0D
E0_0F E0_8F E0_0D E0_F0 0D
17 Q 10 90 15 F0 15
E0_10 E0_90 E0_15 E0_F0 15
18 W 11 91 1D F0 1D
E0_11 E0_91 E0_1D E0_F0 1D
19 E 12 92 24 F0 24
E0_12 E0_92 E0_24 E0_F0 24
20 R 13 93 2D F0 2D
E0_13 E0_93 E0_2D E0_F0 2D
21 T 14 94 2C F0 2C
E0_14 E0_94 E0_2C E0_F0 2C
22 Y 15 95 35 F0 35
E0_15 E0_95 E0_35 E0_F0 35
23 U 16 96 3C F0 3C
E0_16 E0_96 E0_3C E0_F0 3C
24 I 17 97 43 F0 43
E0_17 E0_97 E0_43 E0_F0 43
25 O 18 98 44 F0 44
E0_18 E0_98 E0_44 E0_F0 44
26 P 19 99 4D F0 4D
E0_19 E0_99 E0_4D E0_F0 4D
27 { [ 1A 9A 54 F0 54
E0_1A E0_9A E0_54 E0_F0 54
28 } ] 1B 9B 5B F0 5B
E0_1B E0_9B E0_5B E0_F0 5B
29* | \ 2B AB 5D F0 5D
E0_2B E0_AB E0_5D E0_F0 5D
30 Caps Lock 3A BA 58 F0 58
E0_3A E0_BA E0_58 E0_F0 58
31 A 1E 9E 1C F0 1C
E0_1E E0_9E E0_1C E0_F0 1C
32 S 1F 9F 1B F0 1B
E0_1F E0_9F E0_1B E0_F0 1B
33 D 20 A0 23 F0 23
E0_20 E0_A0 E0_23 E0_F0 23
34 F 21 A1 2B F0 2B
E0_21 E0_A1 E0_2B E0_F0 2B
35 G 22 A2 34 F0 34
E0_22 E0_A2 E0_34 E0_F0 34
36 H 23 A3 33 F0 33
E0_23 E0_A3 E0_33 E0_F0 33
37 J 24 A4 3B F0 3B
E0_24 E0_A4 E0_3B E0_F0 3B
38 K 25 A5 42 F0 42
E0_25 E0_A5 E0_42 E0_F0 42
39 L 26 A6 4B F0 4B
E0_26 E0_A6 E0_4B E0_F0 4B
40 : ; 27 A7 4C F0 4C
E0_27 E0_A7 E0_4C E0_F0 4C
41 “ ‘ 28 A8 52 F0 52
E0_28 E0_A8 E0_52 E0_F0 52
42** 2B AB 5D F0 5D
E0_2B E0_AB E0_5D E0_F0 5D
43 Enter 1C 9C 5A F0 5A
44 L SHIFT 2A AA 12 F0 12
E0_2A E0_AA E0_12 E0_F0 12
45** 56 D6 61 F0 61
E0_56 E0_D6 E0_61 E0_F0 61
46 Z 2C AC 1A F0 1A
E0_2C E0_AC E0_1A E0_F0 1A
key 101/102 Enhanced scan 1 make scan 1 break scan 2 make scan 2 brake
location Keyboard
47 X 2D AD 22 F0 22
E0_2D E0_AD E0_22 E0_F0 22
48 C 2E AE 21 F0 21
E0_2E E0_AE E0_21 E0_F0 21
49 V 2F AF 2A F0 2A
E0_2F E0_AF E0_2A E0_F0 2A
50 B 30 B0 32 F0 32
E0_30 E0_B0 E0_32 E0_F0 32
51 N 31 B1 31 F0 31
E0_31 E0_B1 E0_31 E0_F0 31
52 M 32 B2 3A F0 3A
E0_32 E0_B2 E0_3A E0_F0 3A
53 < , 33 B3 41 F0 41
E0_33 E0_B3 E0_41 E0_F0 41
54 > . 34 B4 49 F0 49
E0_34 E0_B4 E0_49 E0_F0 49
55 ? / 35 B5 4A F0 4A
E0_35 E0_B5 E0_4A E0_F0 4A
56*** 73 F3 51 F0 51
E0_73 E0_F3 E0_51 E0_F0 51
57 R SHIFT 36 B6 59 F0 59
E0_36 E0_B6 E0_59 E0_F0 59
58 L CTRL 1D 9D 14 F0 14
60 L ALT 38 B8 11 F0 11
E0_38 E0_B8 E0_11 E0_F0 11
61 Space Bar 39 B9 29 F0 29
E0_39 E0_B9 E0_29 E0_F0 29
62 R ALT E0 38 E0 B8 E0 11 E0 F0 11
64 R CTRL E0 1D E0 9D E0 14 E0 F0 14
75 Insert Note 1 Note 1 Note 2 Note 2
76 Delete Note 1 Note 1 Note 2 Note 2
79 L Arrow Note 1 Note 1 Note 2 Note 2
80 Home Note 1 Note 1 Note 2 Note 2
81 End Note 1 Note 1 Note 2 Note 2
83 Up Arrow Note 1 Note 1 Note 2 Note 2
84 Dn Arrow Note 1 Note 1 Note 2 Note 2
85 Page Up Note 1 Note 1 Note 2 Note 2
86 Page Down Note 1 Note 1 Note 2 Note 2
89 R Arrow Note 1 Note 1 Note 2 Note 2
90 Num Lock 45 C5 77 F0 77
E0_45 E0_C5 E0_77 E0_F0 77
91 Numeric 7 47 C7 6C F0 6C
92 Numeric 4 4B CB 6B F0 6B
93 Numeric 1 4F CF 69 F0 69
95 Numeric / Note 3 Note 3 Note 3 Note 3
96 Numeric 8 48 C8 75 F0 75
97 Numeric 5 4C CC 73 F0 73
98 Numeric 2 50 D0 72 F0 72
99 Numeric 0 52 D2 70 F0 70
100 Numeric * 37 B7 7C F0 7C
E0_37 E0_B7 E0_7C E0_F0 7C
101 Numeric 9 49 C9 7D F0 7D
102 Numeric 6 4D CD 74 F0 74
103 Numeric 3 51 D1 7A F0 7A
104 Numeric . 53 D3 71 F0 71
105 Numeric - 4A CA 7B F0 7B
106 Numeric + 4E CE 79 F0 79
107*** 7E FE 6D F0 6D
DO NOT USE E0_7E E0_FE E0_6D E0_F0 6D
108 Numeric Enter E0 1C E0 9C E0 5A E0 F0 5A
110 Esc 01 81 76 F0 76
E0_01 E0_81 E0_76 E0_F0 76
112 F1 3B BB 05 F0 05
key 101/102 Enhanced scan 1 make scan 1 break scan 2 make scan 2 brake
location Keyboard
E0_3B E0_BB E0_05 E0_F0 05
113 F2 3C BC 06 F0 06
E0_3C E0_BC E0_06 E0_F0 06
114 F3 3D BD 04 F0 05
E0_3D E0_BD E0_04 E0_F0 05
115 F4 3E BE 0C F0 0C
E0_3E E0_BE E0_0C E0_F0 0C
116 F5 3F BF 03 F0 03
E0_3F E0_BF E0_03 E0_F0 03
117 F6 40 C0 0B F0 0B
E0_40 E0_C0 E0_0B E0_F0 0B
118 F7 41 C1 83 F0 83
E0_41 E0_C1 E0_83 E0_F0 83
119 F8 42 C2 0A F0 0A
E0_42 E0_C2 E0_0A E0_F0 0A
120 F9 43 C3 01 F0 01
E0_43 E0_C3 E0_01 E0_F0 01
121 F10 44 C4 09 F0 09
E0_44 E0_C4 E0_09 E0_F0 09
122 F11 57 D7 78 F0 78
123 F12 58 D8 07 F0 07
124 Print Screen Note 4 Note 4 Note 4 Note 4
125 Scroll Lock 46 C6 7E F0 7E
E0_46 E0_C6 E0_7E E0_F0 7E
126 Pause Note 5 Note 5 Note 5 Note 5
59 D9 0F F0 0F
E0_59 E0_D9 E0_0F E0_F0 0F
5B DB 1F F0 1F
Left Win E0_5B E0_DB E0_1F E0_F0 1F
5C DC 27 F0 27
Right Win E0_5C E0_DC E0_27 E0_F0 27
5D DD 2F F0 2F
Application E0_5D E0_DD E0_2F E0_F0 2F
5E DE 37 F0 37
ACPI Power E0_5E E0_DE E0_37 E0_F0 37
5F DF 3F F0 3F
ACPI Sleep E0_5F E0_DF E0_3F E0_F0 3F
DO NOT USE 60 E0 47 F0 47
DO NOT USE E0_60 E0_E0 E0_47 E0_F0 47
DO NOT USE 61 E1 4F F0 4F
DO NOT USE E0_61 E0_E1 E0_4F E0_F0 4F
62 E2 56 F0 56
E0_62 E0_E2 E0_56 E0_F0 56
63 E3 5E F0 5E
ACPI Wake E0_63 E0_E3 E0_5E E0_F0 5E
64 E4 08 F0 08
E0_64 E0_E4 E0_08 E0_F0 08
65 E5 10 F0 10
E0_65 E0_E5 E0_10 E0_F0 10
66 E6 18 F0 18
E0_66 E0_E6 E0_18 E0_F0 18
67 E7 20 F0 20
E0_67 E0_E7 E0_20 E0_F0 20
68 E8 28 F0 28
E0_68 E0_E8 E0_28 E0_F0 28
69 E9 30 F0 30
E0_69 E0_E9 E0_30 E0_F0 30
6A EA 38 F0 38
E0_6A E0_EA E0_38 E0_F0 38
6B EB 40 F0 40
E0_6B E0_EB E0_40 E0_F0 40
6C EC 48 F0 48
E0_6C E0_EC E0_48 E0_F0 48
key 101/102 Enhanced scan 1 make scan 1 break scan 2 make scan 2 brake
location Keyboard
6D ED 50 F0 50
E0_6D E0_ED E0_50 E0_F0 50
6E EE 57 F0 57
E0_6E E0_EE E0_57 E0_F0 57
6F EF 6F F0 6F
E0_6F E0_EF E0_6F E0_F0 6F
DBE_KATAKANA‡ 70 F0 13 F0 13
E0_70 E0_F0 E0_13 E0_F0 13
71 F1 19 F0 19
E0_71 E0_F1 E0_19 E0_F0 19
72 F2 39 F0 39
E0_72 E0_F2 E0_39 E0_F0 39
74 F4 53 F0 53
E0_74 E0_F4 E0_53 E0_F0 53
75 F5 5C F0 5C
E0_75 E0_F5 E0_5C E0_F0 5C
76 F6 5F F0 5F
E0_76 E0_F6 E0_5F E0_F0 5F
DBE_SBCSCHAR‡ 77 F7 62 F0 62
E0_77 E0_F7 E0_62 E0_F0 62
78 F8 63 F0 63
E0_78 E0_F8 E0_63 E0_F0 63
CONVERT‡ 79 F9 64 F0 64
E0_79 E0_F9 E0_64 E0_F0 64
DO NOT USE 7A FA 65 F0 65
DO NOT USE E0_7A E0_FA E0_65 E0_F0 65
NONCONVERT‡ 7B FB 67 F0 67
DO NOT USE E0_7B E0_FB E0_67 E0_F0 67
DO NOT USE 7C FC 68 F0 68
DO NOT USE E0_7C E0_FC E0_68 E0_F0 68
DO NOT USE 7D FD 6A F0 6A
DO NOT USE E0_7D E0_FD E0_6A E0_F0 6A
DO NOT USE 7F FF 6E F0 6E
DO NOT USE E0_7F E0_FF E0_6E E0_F0 6E
85 Page Up E0 49 E0 C9
86 Page Down E0 51 E0 D1
89 Right Arrow E0 4D E0 CD
As an example, consider the case where Num Lock is OFF and you choose to push and hold Left
SHIFT, then push and hold Right SHIFT, and finally push Insert. The scan codes sent would be:
2A (LSHIFT make)
36 (RSHIFT make)
E0 AA E0 B6 E0 52 (Insert make)
When these keys are released, the keys still held down at the time a key is released determine it’s
scan code. Assume Insert is released first then Right SHIFT and last Left SHIFT. The scan codes
would be:
E0 D2 E0 36 E0 2A (Insert break)
B6 (RSHIFT break)
AA (LSHIFT break)
Since the policy-owner in the operating system has very specific knowledge of when a device is in
use, or potentially in use, there is no need for hardware timers or such to determine when to make
these transitions. Similarly, this level of understanding of device usage makes it possible to use fewer
device power states. Generally, intermediate states attempt to draw a compromise between latency
and consumption due to the uncertainty of actual device usage. With the increased knowledge in the
OS, crisp decisions can be made about whether the device is needed at all. With this ability to turn
devices off more frequently, the benefit of having intermediate states diminishes.
The policy-owner also determines what class-specific events can cause the system to transition from
Sleeping to Working, and enables this functionality based on application or user requests. Note that
the definition of the wake-up events that each class supports will influence the system’s global power
policy in terms of the level of power conservation the Sleeping state can attain while still meeting
wake-up latency requirements set by applications or the user.
In the OnNow architecture, bus drivers also implement power policy for their bus class (e.g. PCI,
USB, etc.). In general, the Bus driver has responsibility for tracking the device power states of all
devices on its bus, and transitioning the Bus itself to only those power states that are consistent with
those of its devices. This means that the Bus state can be no lower than the highest state of one of
it’s devices. However, enabled wake-up events can affect this as well. For example if a particular
device is in the D2 state and set to wake-up the system, and the bus can only forward wake-up
requests while in the D1 state, then the Bus must remain in the D1 state even if all devices are in a
lower state.
Device power state transitions are explicitly commanded by the driver and invoked through bus-
specific mechanisms (e.g., ATA Standby command, USB Suspend, etc.). In some cases, bus-
specific mechanisms are not available and device-specific mechanisms must be used. Note that the
explicit command for entering the D3 state may be the removal of power.
D0: Device is on and running. It is receiving full power from the system, and is delivering full
functionality to
the user.
D1: Class-specific low-power state (defined below) in which device context may or may not be
lost.
D2: Class-specific low-power state (defined below) in which device context may or may not be
lost. Attains
greater power savings than D1.
D3: Device is off and not running. Device context is lost. Power may be removed from the
device.
D0 D1 or D3*
Requested by system (e.g. system goes to sleep w/ wake-up
enabled).
D0, D1 D3 Requested by system (e.g. system goes to sleep w/ wake-up
disabled).
Power is removed.
D1, D3 D0 Device with wake-up capability enabled request transition by
generating a wake-up event; request is ultimately granted by
system.
Requested by system.
* Depends on capability of device (if device features D1 or D3 wake-up capability or not); device will
be put in state with lowest possible power consumption.
The actual input data (particular button or key pressed, etc.) that’s associated with a wake-up event
should never be discarded by the device itself, but should always be passed along to device driver(s)
for further interpretation. It is up to the device driver(s) to implement a policy for how this input data
should be interpreted, and decide what should be passed along to higher-level software, etc.
It is recommended that the device button(s) or key(s) used for power management purposes are
clearly labeled with text and/or icons. This is recommended for keyboards and other input devices on
which all buttons or keys are typically labeled with text and/or icons to identify their usage.
Examples of more advanced wake-up events include keyboard wake-up signaling when any key is
pressed, mouse wake-up signaling on detection of X/Y motion, joystick wake-up signaling on X/Y
motion, etc. However, in order to avoid accidental or unintentional wake-up of the system, and to give
the user some control over which input events will result in a system wake-up, it’s suggested that
more advanced types of wake-up events are implemented as features that can be turned on/off by
the user via, for example, a control panel type of software application.
D3 Mandatory.
These usages should be used in following manner with the power management buttons:
POWER button:
Should send usage “System Power Down” when the button is pressed to power down the
system. The system power policy manager will look up the POWER button action in the current
power policy (by default, shutdown) and take that action.
Should send usage “System Wake Up” when the button is pressed again to power up the
system.
SLEEP button:
Should send usage “System Sleep” when the button is pressed to put the system to sleep. The
system power policy manager will look up the SLEEP button action in the current power policy
(by default, sleep) and take that action.
Should send usage “System Wake Up” when the button is pressed again to wake up the system.
The power management buttons should be reported in a System Control application level collection
(a.k.a. “top level” collection) in order to be interpreted correctly by the host system software. Power
management buttons appearing in other application level collections will be ignored.
Note: In previous revisions of this specification, the “Keyboard Power” usage (index 102dec/66hex)
as defined in the Keyboard/Keypad Page (page 0x07) in the core HID 1.0 specification was
recommended as the way to implement a POWER button on a keyboard. However, this
recommendation should not be followed anymore and has been replaced with the recommendations
above.
The Power, Sleep, and Wake event scan codes are the i8042 equivalents to the System Power
Down, System Sleep, and System Wake Up HID usages as defined above.
Note: Due to the variation of keyboards from language to language, it is not feasible to specify exact key
mappings for every language. Where this list is not specific for a key function in a language, the closest
equivalent key position should be used, so that a keyboard may be modified for a different language by
simply printing different keycaps. One example is the Y key on a North American keyboard. In Germany, this
is typically Z. Rather than changing the keyboard firmware to put the Z Usage into that place in the descriptor
list, the vendor should use the Y Usage on both the North American and German keyboards. This continues to
be the existing practice in the industry, in order to minimize the number of changes to the electronics to
accommodate other languages.
Footnotes
1. Usage of keys is not modified by the state of the Control, Alt, Shift or Num Lock keys. That is, a
key does not send extra codes to compensate for the state of any Control, Alt, Shift or Num Lock
keys.
2. Typical language mappings: US: \| Belg: µ`£ FrCa: <}> Dan:’* Dutch: <> Fren:*µ Ger: #’ Ital: ù§
LatAm: }`] Nor:,* Span:}Ç Swed: ,* Swiss: $£ UK: #~.
3. Typical language mappings: Belg:<\> FrCa:«°» Dan:<\> Dutch:]|[ Fren:<> Ger:<|> Ital:<>
LatAm:<> Nor:<> Span:<> Swed:<|> Swiss:<\> UK:\| Brazil: \|.
4. Typically remapped for other languages in the host system.
5. Keyboard Enter and Keypad Enter generate different Usage codes.
6. Typically near the Left-Shift key in AT-102 implementations.
7. Example, Erase-Eaze™ key.
8. Reserved for language-specific functions, such as Front End Processors and Input Method
Editors.
9. Reserved for typical keyboard status or keyboard errors. Sent as a member of the keyboard
array. Not a physical key.
10. Microsoft Windows key for Microsoft Windows 95 and “Compose.”
11. Implemented as a non-locking key; sent as member of an array.
12. Implemented as a locking key; sent as a toggle button. Available for legacy support; however,
most systems should use the non-locking version of this key.
13. Backs up the cursor one position, deleting a character as it goes.
14. Deletes one character without changing position.
15. See next page
16. See next page
17. See next page
18. See next page
19. See next page
20. See next page
21. Toggle Double-Byte/Single-Byte mode.
22. Undefined, available for other Front End Language Processors.
23. Windowing environment key, examples are Microsoft Left Win key, Macintosh Left Apple key,
Sun Left Meta key
24. Windowing environment key, examples are Microsoft Right Win key, Macintosh Right Apple key,
Sun Right Meta key.