In human–computer interfaces, the X keyboard extension or XKB is a part of the X Window System that extends the ability to control the keyboard over what is offered by the X Window System core protocol, and allows to use multiple keyboard layouts. Its main features are: enhanced support for modifiers (, , etc.); better treatment of key groups (typically keyboard layouts); extended control of keyboard indicators (LEDs) and bells; various new keyboard parameters (controls); association of actions (of a particular kind) to keys. XKB is composed of two parts: a server extension and a client library. Modern versions of Xlib contain XKB, which is active by default. Client programs not using this extension can deactivate it before connecting with the server, or can simply work normally as the extension simulates the core protocol by default. XKB is also used by Wayland compositors and kmscon. Latched and locked modifiers XKB allows a modifier to be locked or latched, other than being in its regular state. Normally, a modifier is active exactly when it is pressed, like the Shift. However, a modifier may also be locked, like the Caps Lock modifier. When a modifier is locked, it remains active until it is explicitly deactivated. An intermediate condition between regular and locked is the latched state: When a modifier is latched, it remains active, but only until the next non-modifier key is pressed. XKB allows a client application to explicitly latch or lock a modifier. Moreover, an application can bind a key press or release to a modifier state change. This way, a modifier may automatically become latched or locked whenever a key is pressed or released. Key groups XKB allows for the keyboard to switch between any of four different character groups. This is usually done for making a keyboard behave like a keyboard of a different language. In this context, the set of characters that is generated by the keyboard is called a group, and a keyboard can switch to a different group at any time. XKB defines some group selectors (which are simply called groups in the specification). As with modifiers, a group selector can be associated with a key, but can also be latched or locked. Controls The behavior of the keyboard depends on a number of parameters that can be changed by the clients. These parameters are called controls. For example, the SlowKey control can be used