Interactions Between XKB and the X Input Extension
All XKB interactions with the input extension are optional; implementors are
free to restrict the effects of the X Keyboard Extension to the core keyboard
device. The
XkbGetExtensionDeviceInfo
request reports whether or not an XKB implementation supports a particular
capability for input extension devices.
XKB recognizes the following interactions with the X Input Extension:
NameCapabilityXI_KeyboardsIf set, applications can use all XKB requests and events with
extension keyboards.XI_ButtonActionsIf set, clients can assign key actions to buttons, even on input
extension devices that are not keyboards.XI_IndicatorNamesIf set, clients can assign names to indicators on non-keyboard
extension devices.XI_IndicatorMapsIf set, clients can assign indicator maps to indicators on
non-keyboard extension devices. XI_IndicatorStateIf set, clients can change the state of device indicators using the
XkbSetExtensionDeviceInfo
request.
Attempts to use an XKB feature with an extension device fail with a
Keyboard
error if the server does not support the
XkbXI_Keyboards
optional feature. If a capability particular capability other than
XkbXI_Keyboards
is not supported, attempts to use it fail silently. The replies for most
requests that can use one of the other optional features include a field to
report whether or not the request was successful, but such requests do not
cause an error condition.
Clients can also request an
XkbExtensionDeviceNotify
event. This event notifies interested clients of changes to any of the
supported XKB features for extension devices, or if a request from the client
that is receiving the event attempted to use an unsupported feature.
Using XKB Functions with Input Extension Keyboards
All XKB requests and events include a device identifier which can refer to an
input extension
KeyClass
device, if the implementation allows XKB to control extension devices. If the
implementation does not support XKB manipulation of extension devices, the
device identifier is ignored but it must be either
0
or
UseCoreKbd
.
Implementations which do not support the use of XKB functions with extension
keyboards must not set the
XkbXI_Keyboards
flag. Attempts to use XKB features on an extension keyboard with an
implementation that does not support this feature yield a
Keyboard
error.
Pointer and Device Button Actions
The XKB extension optionally allows clients to assign any key action (see
See Key Actions) to core
pointer or input extension device buttons. This makes it possible to control
the keyboard or generate keyboard key events from extension devices or from the
core pointer.
XKB implementations are required to support actions for the buttons of the core
pointer device, but support for actions on extension devices is optional.
Implementations which do not support button actions for extension devices must
not set the
XkbXI_ButtonActions
flag.
Attempts to query or assign button actions with an implementation that does not
support this feature report failure in the request reply and might cause the
server to send an
XkbExtensionDeviceNotify
event to the client which issued the request that failed. Such requests never
cause an error condition.
Indicator Maps for Extension Devices
The XKB extension allows applications to assign indicator maps to the
indicators of non-keyboard extension devices. If supported, maps can be
assigned to all extension device indicators, whether they are part of a
keyboard feedback or part of an indicator feedback.
Implementations which do not support indicator maps for extension devices must
not set the
XkbXI_IndicatorMaps
flag.
Attempts to query or assign indicator maps with an implementation that does not
support this feature report failure in the request reply and might cause the
server to send an
XkbExtensionDeviceNotify
event to the client which issued the request that failed. Such requests never
cause an error condition.
If this feature is supported, the maps for the default indicators on the core
keyboard device are visible both as extension indicators and as the core
indicators. Changes made with
XkbSetDeviceInfo
are visible via
XkbGetIndicatorMap
and changes made with
XkbSetIndicatorMap
are visible via
XkbGetDeviceInfo
.
Indicator Names for Extension Devices
The XKB extension allows applications to assign symbolic names to the
indicators of non-keyboard extension devices. If supported, symbolic names can
be assigned to all extension device indicators, whether they are part of a
keyboard feedback or part of an indicator feedback.
Implementations which do not support indicator maps for extension devices must
not set the
XkbXI_IndicatorMaps
flag.
Attempts to query or assign indicator names with an implementation that does
not support this feature report failure in the request reply and might cause
the server to send an
XkbExtensionDeviceNotify
event to the client which issued the request that failed. Such requests never
cause an error condition.
If this feature is supported, the names for the default indicators on the core
keyboard device are visible both as extension indicators and as the core
indicators. Changes made with
XkbSetDeviceInfo
are visible via
XkbGetNames
and changes made with
XkbSetNames
are visible via
XkbGetDeviceInfo
.