Skip to content

The X Keyboard Extension: Protocol Specification

X Consortium Standard

Erik Fortune

Silicon Graphics, Inc

X Version 11, Release 7.7

Version 1.0

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation 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
1. Overview
Conventions and Assumptions
2. Keyboard State
Locking and Latching Modifiers and Groups
Fundamental Components of XKB Keyboard State
Computing Effective Modifier and Group
Computing A State Field from an XKB State
Derived Components of XKB Keyboard State
Server Internal Modifiers and Ignore Locks Behavior
Compatibility Components of Keyboard State
3. Virtual Modifiers
Modifier Definitions
Inactive Modifier Definitions
Virtual Modifier Mapping
4. Global Keyboard Controls
The RepeatKeys Control
The PerKeyRepeat Control
Detectable Autorepeat
The SlowKeys Control
The BounceKeys Control
The StickyKeys Control
The MouseKeys Control
The MouseKeysAccel Control
Relative Pointer Motion
Absolute Pointer Motion
The AccessXKeys Control
The AccessXTimeout Control
The AccessXFeedback Control
The Overlay1 and Overlay2 Controls
"Boolean" Controls and The EnabledControls Control
Automatic Reset of Boolean Controls
5. Key Event Processing Overview
6. Key Event Processing in the Server
Applying Global Controls
Key Behavior
Key Actions
Delivering a Key or Button Event to a Client
XKB Interactions With Core Protocol Grabs
7. Key Event Processing in the Client
Notation and Terminology
Determining the KeySym Associated with a Key Event
Key Types
Key Symbol Map
Transforming the KeySym Associated with a Key Event
Client Map Example
8. Symbolic Names
9. Keyboard Indicators
Global Information About Indicators
Per-Indicator Information
Indicator Maps
10. Keyboard Bells
Client Notification of Bells
Disabling Server Generated Bells
Generating Named Bells
Generating Optional Named Bells
Forcing a Server Generated Bell
11. Keyboard Geometry
Shapes and Outlines
Sections
Doodads
Keyboard Geometry Example
12. Interactions Between XKB and the Core Protocol
Group Compatibility Map
Setting a Passive Grab for an XKB State
Changing the Keyboard Mapping Using the Core Protocol
Explicit Keyboard Mapping Components
Assigning Symbols To Groups
Assigning Types To Groups of Symbols for a Key
Assigning Actions To Keys
Updating Everything Else
Effects of XKB on Core Protocol Events
Effect of XKB on Core Protocol Requests
Sending Events to Clients
13. The Server Database of Keyboard Components
Component Names
Partial Components and Combining Multiple Components
Component Hints
Keyboard Components
The Keycodes Component
The Types Component
The Compatibility Map Component
The Symbols Component
The Geometry Component
Complete Keymaps
14. Replacing the Keyboard "On-the-Fly"
15. Interactions Between XKB and the X Input Extension
Using XKB Functions with Input Extension Keyboards
Pointer and Device Button Actions
Indicator Maps for Extension Devices
Indicator Names for Extension Devices
16. XKB Protocol Requests
Errors
Keyboard Errors
Side-Effects of Errors
Common Types
Requests
Initializing the X Keyboard Extension
Selecting Events
Generating Named Keyboard Bells
Querying and Changing Keyboard State
Querying and Changing Keyboard Controls
Querying and Changing the Keyboard Mapping
Querying and Changing the Compatibility Map
Querying and Changing Indicators
Querying and Changing Symbolic Names
Querying and Changing Keyboard Geometry
Querying and Changing Per-Client Flags
Using the Server’s Database of Keyboard Components
Querying and Changing Input Extension Devices
Debugging the X Keyboard Extension
Events
Tracking Keyboard Replacement
Tracking Keyboard Mapping Changes
Tracking Keyboard State Changes
Tracking Keyboard Control Changes
Tracking Keyboard Indicator State Changes
Tracking Keyboard Indicator Map Changes
Tracking Keyboard Name Changes
Tracking Compatibility Map Changes
Tracking Application Bell Requests
Tracking Messages Generated by Key Actions
Tracking Changes to AccessX State and Keys
Tracking Changes To Extension Devices
A. Default Symbol Transformations
Interpreting the Control Modifier
Interpreting the Lock Modifier
Locale-Sensitive Capitalization
Locale-Insensitive Capitalization
B. Canonical Key Types
Canonical Key Types
The ONE_LEVEL Key Type
The TWO_LEVEL Key Type
The ALPHABETIC Key Type
The KEYPAD Key Type
C. New KeySyms
New KeySyms
KeySyms Used by the ISO9995 Standard
KeySyms Used to Control The Core Pointer
KeySyms Used to Change Keyboard Controls
KeySyms Used To Control The Server
KeySyms for Non-Spacing Diacritical Keys
D. Protocol Encoding
Syntactic Conventions
Common Types
Errors
Key Actions
Key Behaviors
Requests
Events