首页 USB HID键盘扫描码

USB HID键盘扫描码

举报
开通vip

USB HID键盘扫描码Windows Platform Design Notes Windows Platform Design Notes Designing Hardware for the Microsoft Windows Family of Operating Systems Keyboard Scan Code Specification Abstract: This specification details the PS/2 Scan Codes and USB Usage Tables that are validat...

USB HID键盘扫描码
Windows Platform Design Notes Windows Platform Design Notes Designing Hardware for the Microsoft Windows Family of Operating Systems Keyboard Scan Code Specification 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. Contents TOC \o "1-2" 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 23 Appendix B: Device Class Power Management v1.0a 24 Scope 24 General Device Power Management Considerations 24 Input Device Power State Definitions 25 Input Device Power Conservation Policy 25 Input Device Wake-up Events 26 Minimum Input Device Power Capabilities 26 Recommendations for Human Interface Devices 27 Recommendations for i8042 keyboards 27 Appendix C: USB Keyboard/Keypad Page (0x07) 28 Footnotes 33 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 Revision Date Comments 1.3a 3/16/00 Adjusted title and related references 1.3 2/23/99 Apps key removed as modifier, Hid audio control usages added 1.2 6/25/98 ACPI Codes corrected. 1.1 5/1/98 Scan Code Set 3 requirement removed. 1.0 3/27/98 Initial proposal for consideration. Windows Keys Support for Windows Software Applications The 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 Code Set 1: Windows Key Make Break Windows Virtual Key Left Windows E0 5B E0 DB 5B Right Windows E0 5C E0 DC 5C Application E0 5D E0 DD 5D Key Codes for Scan Code Set 2: Windows Key Make Break Windows Virtual Key Left Windows E0 1F E0 F0 1F 5B Right Windows E0 27 E0 F0 27 5C Application E0 2F E0 F0 2F 5D Key Codes for USB Usage Tables: Windows Key Usage Page Usage Index (Dec) Usage Index (Hex) Typical AT-101 position Left Windows 0x07 227 E3 127 Right Windows 0x07 231 E7 128 Application 0x07 101 65 129 What Software Applications Vendors Should Support and How To provide support for the Windows Keys, an application should support the application 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 and SHIFT+Application. These key combinations are reserved for applications to support. Support for Windows+Application is reserved for the operating system. Application Key Combinations Recommended Support CTRL + Application Key unspecified, application specific ALT + Application Key unspecified, application specific SHIFT + Application Key unspecified, application specific Windows + Application Key reserved for operating system Application Key + not supported as a modifier key, support must be supplied by application Suggestions for Support of Application Key Combinations  Context menu at the location of the 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 application UI Application Key Support in the Microsoft Windows Operating Systems The 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 Supported by the Operating System Operating System Windows 3.x no response1 Windows NT 3.5x no response1 Windows NT 4.0 context menu on selection Windows NT 4.0 context menu on selection Windows 95 context menu on selection Windows 98 context menu on selection 1 Windows still reports a 5D virtual key code which means that applications can enable functionality 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 whqlinfo@microsoft.com 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 Windows 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 Windows 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 additional combinations will be used by the Microsoft Windows 95, Windows 98, or Windows NT operating systems. Windows Logo Key Combination Functionality in Windows 95/98 Windows + F1 Display the popup menu for the selected object. Windows + TAB Activate next Taskbar button. Windows + E Explore My Computer. Windows + F Find Document. Windows + CTRL + F Find Computer. Windows + M Minimize All. SHIFT + Windows + M Undo Minimize All. Windows + R Display Run dialog box. Windows + PAUSE (Break) Perform a system function. Windows Keys Support for OEMs and Keyboard IHVs OEMs that buy their keyboards with Windows Logo keys from a licensed keyboard manufacturer and do not modify the keyboard product except to add their Logo and other cosmetic changes are not required to license the Windows Logo keys from Microsoft. If the OEM product changes the layout or BIOS of an already licensed keyboard the OEM must go through the same licensing and certification procedure as described in the next section of this document. Software Support of the Windows Keys in the Windows 95/98 Operating System The Windows Keys are supported in the Windows 95, Windows 98, or Windows NT operating systems user interface. Application vendors will enable functionality for the Application key in their applications. 10 Windows Logo key combinations are reserved for OEM use. Key Event Supported Windows Support Application Support OEM System Utilities Windows Logo Key open the Start menu Windows Logo key Combinations 9 shortcut functions Win + 1-0 reserved for OEM Application Logo Key context menu on selection context menu on selection context menu on selection CTRL, ALT, SHIFT+Application varies by application varies by utility Special Keys Reserved for OEM Usage Ten (10) Windows Logo keys combinations have been reserved for OEM use. These keys can be used by OEMs to provide keyboard hotkey controls for Speaker Volume, Monitor/LCD Brightness or Contrast, Password, or other value added functions. Windows Logo Key Combination Status Windows + 1 reserved for OEMs Windows + 2 reserved for OEMs Windows + 3 reserved for OEMs Windows + 4 reserved for OEMs Windows + 5 reserved for OEMs Windows + 6 reserved for OEMs Windows + 7 reserved for OEMs Windows + 8 reserved for OEMs Windows + 9 reserved for OEMs Windows + 0 reserved for OEMs Windows + all other key combinations reserved for operating system Multiple Key Operation Requirements Valid 2-Key Combinations The following list combined with the “Valid Final Keys” table, defines the valid 2-key combinations. When any one of the keys below is pressed, followed by a 2nd key from the “Valid Final Keys” table, the keyboard must properly indicate that those 2 keys are pressed. There are no exceptions to these 2-Key Combinations. ​ 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. Esc Tab c Left Arrow F1 q v Right Arrow F2 w b Up Arrow F3 e n Down Arrow F4 r m F6 y . Enter F7 u / Print Screen F8 i Insert Scroll Lock F9 o Delete Pause F10 p Home Num Lock F11 [ End Numeric 0 F12 ] Page Up Numeric 1 ` \ Page Down Numeric 2 1 a Numeric 3 2 s Numeric 4 3 d Numeric 5 4 f Numeric 6 5 g Numeric 7 6 h Numeric 8 7 j Numeric 9 8 k Numeric / 9 l Numeric * 0 ; Numeric - - ‘ Numeric + = z Numeric Enter Backspace x Numeric . Indicates Traditional IBM Final keys. Valid 3-Key Combinations The following table combined with the “Valid Final Keys” table, defines the valid 3-key combinations. For each row in the table below, an “X” indicates that key is selected. When the two keys in a row are pressed followed by a 3rd key from the “Valid Final Keys” table, the keyboard must properly indicate that those 3 keys are pressed. Exceptions to these tables are listed below. Any 3-key combinations not listed are not required to work, but may do so at the keyboard manufacturer’s discretion. LWIN RWIN LCTRL RCTRL LSHIFT RSHIFT LALT RALT X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Indicates Traditional IBM 3-Key combinations. Combinations of 3-Keys which are Unavailable Based upon the standard industry accepted 16 X 8 scanning matrix, several keys will be “ghosted”, meaning not uniquely detectable by the firmware during the key switch scanning of 3-Key combinations. To accommodate this, the following table details the key combinations, which are excluded from the above tables. These 3-key combinations are not required to work, but may do so at the keyboard manufacturer’s discretion. 1st Key 2nd Key 3rd Key LWIN RWIN Up Arrow RWIN LALT key 56 RWIN RALT key 42 RWIN RCTRL Caps Lock RWIN LCTRL Caps Lock LWIN LALT key 107 LCTRL LSHIFT Pause, Caps Lock RCTRL RSHIFT Pause, Caps Lock Additional General Requirements LWIN and RWIN Keys as modifiers This keyboard must generate unique scan codes for make and break. The LWIN and RWIN keys must be treated as modifier keys, much in the same way as ALT, and Control keys are handled today. It will be up to the operating system to decide on an implementation scheme for the modifier key functionality. Building a Keyboard with the Windows Keys Tools Needed to Build a Keyboard with the Windows Keys ​ Keyboard Scan Code Specification (this document). ​ Microsoft Windows Logo License Agreement ​ Windows Logo Key License Agreement. ​ Windows Exhibit A from the Device Testing Agreement. ​ Windows Exhibit B from the “Designed for Microsoft” Logo License Agreement. ​ Windows Keyboard Test Kit: Test Procedures and Test Tools. 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. Microsoft Windows Legal Agreements Complete and sign the Microsoft Logo License Agreement and the Testing Agreement. If your company previously signed these agreements, you only need to include a newly completed “Exhibit A” of the Testing Agreement with your Test Submission. 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 whqlinfo@microsoft.com with AGREEMENT REQUEST in the Subject line. Send blank e-mail to the auto reply at whqlinfo@microsoft.com for a complete list of administrative contacts. Steps to Ship a Keyboard with the Windows Logo Keys Develop your keyboard according to the tables in Appendix A of this specification. 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. Recommended Physical Locations of the Windows Keys For full travel desktop keyboards Microsoft recommends that the Windows Logo keys be located near the current modifier keys like CTRL, SHIFT and ALT since the Windows Logo keys must also function as modifier keys. The Application key can be located wherever it appropriately fits. In the attached diagram the keys were placed on the bottom row on either s
本文档为【USB HID键盘扫描码】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
is_050512
暂无简介~
格式:doc
大小:2MB
软件:Word
页数:35
分类:互联网
上传时间:2011-07-31
浏览量:97