The X Keyboard Extension
Total Page:16
File Type:pdf, Size:1020Kb
The X Keyboard Extension: Protocol Specification X Consortium Standard Erik Fortune The X Keyboard Extension: Protocol Specification: X Consortium Standard Erik Fortune X Version 11, Release 6.4 Copyright © 1995, 1996 X Consortium Inc. Copyright © 1995, 1996 Silicon Graphics Inc. Copyright © 1995, 1996 Hewlett-Packard Company Copyright © 1995, 1996 Digital Equipment Corporation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated docu- mentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the names of the X Consortium, Silicon Graphics Inc., Hewlett-Packard Company, and Digital Equipment Corporation shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. Table of Contents Acknowledgments ................................................................................................. vi 1. Overview ............................................................................................................ 1 Conventions and Assumptions ....................................................................... 1 2. Keyboard State .................................................................................................. 3 Locking and Latching Modifiers and Groups ................................................ 3 Fundamental Components of XKB Keyboard State ....................................... 3 Computing Effective Modifier and Group .............................................. 4 Computing A State Field from an XKB State ......................................... 4 Derived Components of XKB Keyboard State ................................................ 5 Server Internal Modifiers and Ignore Locks Behavior ........................... 5 Compatibility Components of Keyboard State ............................................... 6 3. Virtual Modifiers ............................................................................................... 7 Modifier Definitions ....................................................................................... 7 Inactive Modifier Definitions .................................................................. 8 Virtual Modifier Mapping .............................................................................. 8 4. Global Keyboard Controls ............................................................................... 10 The RepeatKeys Control .............................................................................. 10 The PerKeyRepeat Control ................................................................... 10 Detectable Autorepeat .......................................................................... 10 The SlowKeys Control .................................................................................. 11 The BounceKeys Control .............................................................................. 11 The StickyKeys Control ................................................................................ 11 The MouseKeys Control ............................................................................... 12 The MouseKeysAccel Control ...................................................................... 12 Relative Pointer Motion ........................................................................ 12 Absolute Pointer Motion ....................................................................... 13 The AccessXKeys Control ............................................................................ 13 The AccessXTimeout Control ....................................................................... 13 The AccessXFeedback Control ..................................................................... 14 The Overlay1 and Overlay2 Controls ........................................................... 15 "Boolean" Controls and The EnabledControls Control ................................ 15 Automatic Reset of Boolean Controls .......................................................... 16 5. Key Event Processing Overview ...................................................................... 17 6. Key Event Processing in the Server ............................................................... 18 Applying Global Controls ............................................................................. 18 Key Behavior ................................................................................................ 18 Key Actions .................................................................................................. 20 Delivering a Key or Button Event to a Client .............................................. 29 XKB Interactions With Core Protocol Grabs ........................................ 30 7. Key Event Processing in the Client ................................................................. 31 Notation and Terminology ........................................................................... 31 Determining the KeySym Associated with a Key Event ............................... 32 Key Types ............................................................................................. 32 Key Symbol Map .................................................................................. 33 Transforming the KeySym Associated with a Key Event ............................. 34 Client Map Example .................................................................................... 35 8. Symbolic Names .............................................................................................. 37 9. Keyboard Indicators ........................................................................................ 39 Global Information About Indicators ........................................................... 39 Per-Indicator Information ............................................................................ 39 Indicator Maps ..................................................................................... 40 iii The X Keyboard Exten- sion: Protocol Specification 10. Keyboard Bells .............................................................................................. 44 Client Notification of Bells .......................................................................... 44 Disabling Server Generated Bells ................................................................ 44 Generating Named Bells .............................................................................. 44 Generating Optional Named Bells ............................................................... 45 Forcing a Server Generated Bell ................................................................. 45 11. Keyboard Geometry ....................................................................................... 46 Shapes and Outlines .................................................................................... 47 Sections ........................................................................................................ 47 Doodads ........................................................................................................ 48 Keyboard Geometry Example ...................................................................... 48 12. Interactions Between XKB and the Core Protocol ........................................ 50 Group Compatibility Map ............................................................................ 50 Setting a Passive Grab for an XKB State ............................................. 51 Changing the Keyboard Mapping Using the Core Protocol ......................... 51 Explicit Keyboard Mapping Components ............................................. 51 Assigning Symbols To Groups .............................................................. 52 Assigning Types To Groups of Symbols for a Key ................................ 54 Assigning Actions To Keys .................................................................... 55 Updating Everything Else .................................................................... 56 Effects of XKB on Core Protocol Events ...................................................... 56 Effect of XKB on Core Protocol Requests .................................................... 57 Sending Events to Clients ........................................................................... 58 13. The Server Database of Keyboard Components ............................................ 59 Component Names ....................................................................................... 59 Partial Components and Combining Multiple Components ......................... 59 Component Hints ........................................................................................