1、USBHID键盘扫描码Windows Platform Design NotesDesigning Hardware for the Microsoft Windows Family of Operating SystemsKeyboard Scan Code SpecificationAbstract: This specification details the PS/2 Scan Codes and USB Usage Tables that are validated for compliance to the Microsoft Windows Logo Program testin
2、g 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 Ha
3、rdware 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 dat
4、e 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 WAR
5、RANTIES, 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, t
6、rademarks, 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 spec
7、ifications. 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 ki
8、nd 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 ri
9、ghts 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 o
10、r consequential or incidental damages; the above limitation may not apply to you. Microsoft, Win32, Windows, and WindowsNT 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 tradema
11、rks of their respective owners.1996-2000MicrosoftCorporation. All rights reserved.ContentsNotice of ChangeThis 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. Th
12、is 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 Windo
13、ws 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 p
14、rior 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
15、of Windows-based applications to support any compatible implementation.Revision HistoryRevisionDateComments1.3a3/16/00Adjusted title and related references1.32/23/99Apps key removed as modifier, Hid audio control usages added1.26/25/98ACPI Codes corrected.1.15/1/98Scan Code Set 3 requirement removed
16、.1.0 3/27/98Initial proposal for consideration.Windows Keys Support for Windows Software ApplicationsThe three Windows Keys report the following key codes in the Microsoft Windows 95, Windows 98, and Windows NT operating systems, and future versions of Windows operating systems.Key Codes for Scan Co
17、de Set 1:Windows KeyMakeBreakWindows Virtual KeyLeft Windows E0 5BE0 DB 5BRight Windows E0 5CE0 DC5CApplication E0 5DE0 DD5DKey Codes for Scan Code Set 2:Windows KeyMakeBreakWindows Virtual KeyLeft WindowsE0 1FE0 F0 1F 5BRight WindowsE0 27E0 F0 275CApplicationE0 2FE0 F0 2F5DKey Codes for USB Usage T
18、ables:Windows KeyUsage PageUsage Index (Dec)Usage Index (Hex)Typical AT-101 positionLeft Windows0x07227E3127Right Windows0x07231E7128Application0x0710165129What Software Applications Vendors Should Support and HowTo provide support for the Windows Keys, an application should support the application
19、key virtual key scan code (5D) as a context menu event similar to a right mouse button click in some applications today.Applications vendors are encouraged to extend their support beyond the application key to include support for application key combinations like CTRL+Application, Alt+Application an
20、d SHIFT+Application. These key combinations are reserved for applications to support. Support for Windows+Application is reserved for the operating system.Application Key CombinationsRecommended SupportCTRL + Application Keyunspecified, application specificALT + Application Keyunspecified, applicati
21、on specificSHIFT + Application Keyunspecified, application specificWindows + Application Keyreserved for operating systemApplication Key + not supported as a modifier key, support must be supplied by applicationSuggestions for Support of Application Key Combinations Context menu at the location of t
22、he text cursor (instead of the mouse pointer) Launch automated help agent Pop up list of last 5 actions (or list of commonly accessed functions) Enable/Disable macro recording or other user controllable features Switch to next open window in a multiple document User assignable key through an applica
23、tion UIApplication Key Support in the Microsoft Windows Operating SystemsThe application key will primarily function to bring up a context menu at the selection or mouse pointer. This functionality is the same as the right mouse button click in some applications today. Application Key Response Suppo
24、rted by the Operating SystemOperating SystemWindows 3.xno response1Windows NT 3.5xno response1Windows NT 4.0context menu on selectionWindows NT 4.0context menu on selectionWindows 95context menu on selectionWindows 98context menu on selection1 Windows still reports a 5D virtual key code which means
25、that applications can enable functionalityUsing the Windows Logo Key Logo and Application Key Logo in DocumentationThe 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 con
26、sistent with Microsofts 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 specifie
27、d 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 whqlinfo with “Artwork Request” in your subject line. Alternatively, you may use the Windows fl
28、ag 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 modifie
29、r if appropriate. Examples are shown: Windows Logo key + B or + B Application key + S or + + SWindows Logo Key Support (Reserved for Operating System Use)The Windows Logo keys are reserved for system level functions. Software developers should not implement support for the Windows Logo keys in Windo
30、ws 95, Windows 98, or Windows NT-based applications. The Windows Logo keys are supported in the operating system and provide system level functionality to the end user. The following table lists a few of the Windows Logo key combinations and their functionality. This list is not exhaustive and addit
31、ional combinations will be used by the Microsoft Windows 95, Windows 98, or Windows NT operating systems.Windows Logo Key CombinationFunctionality in Windows 95/98Windows + F1Display the popup menu for the selected object.Windows + TABActivate next Taskbar button.Windows + EExplore My Computer.Windows + FFind Document.Windows + CTRL + FFind Computer.Windows + MMinimize All.SHIFT + Windows + MUndo Minimize All.Windows + RDisplay Run dialog box.Windows + PAUSE (Break)Perform a system function.Windows Keys Support for OEMs and Keyboard