XkbSetControls − Copies changes to the X server based on a modified ctrls structure in a local copy of the keyboard description


Bool XkbSetControls

(Display *display, unsigned long which, XkbDescPtr



− display

connection to X server

− which

mask of controls requested

− xkb

keyboard description for controls information


For each bit that is set in the which parameter, XkbSetControls sends the corresponding values from the xkb->ctrls field to the server. Valid values for which are any combination of the masks listed in Table 1 that have "ok" in the which column.

Table 1 shows the actual values for the individual mask bits used to select controls for modification and to enable and disable the control. Note that the same mask bit is used to specify general modifications to the parameters used to configure the control (which), and to enable and disable the control (enabled_ctrls). The anomalies in the table (no "ok" in column) are for controls that have no configurable attributes; and for controls that are not boolean controls and therefore cannot be enabled or disabled.

If xkb->ctrls is NULL, the server does not support a compatible version of Xkb, or the Xkb extension has not been properly initialized, XkbSetControls returns False. Otherwise, it sends the request to the X server and returns True.

Note that changes to attributes of controls in the XkbControlsRec structure are apparent only when the associated control is enabled, although the corresponding values are still updated in the X server. For example, the repeat_delay and repeat_interval fields are ignored unless the RepeatKeys control is enabled (that is, the X server’s equivalent of xkb->ctrls has XkbRepeatKeyMask set in enabled_ctrls). It is permissible to modify the attributes of a control in one call to XkbSetControls and enable the control in a subsequent call. See XkbChangeEnabledControls for more information on enabling and disabling controls.

Note that the enabled_ctrls field is itself a control - the EnabledControls control. As such, to set a specific configuration of enabled and disabled boolean controls, you must set enabled_ctrls to the appropriate bits to enable only the controls you want and disable all others, then specify the XkbControlsEnabledMask in a call to XkbSetControls.

Because this is somewhat awkward if all you want to do is enable and disable controls, and not modify any of their attributes, a convenience function is also provided for this purpose, XkbChangeEnabledControls.



The XkbSetControls function returns True when it sends the request to the X server.


The XkbSetControls function returns False when xkb->ctrls is NULL, the server does not support a compatible version of Xkb, or the Xkb extension has not been properly initialized.



Unable to allocate storage


A compatible version of Xkb was not available in the server or an argument has correct type and range, but is otherwise invalid


XkbChangeEnabledControls(3), XkbFreeControls(3)

More Linux Commands

innd(8) - InterNetNews daemon (Admin - Linux man page)......
innd, the InterNetNews daemon, handles all incoming NNTP feeds, coordinates the storage, retransmission, and overview generation for all accepted articles, and

getpagesize(2) - get memory page size - Linux manual page...
The function getpagesize() returns the number of bytes in a memory page, where page is a fixed-length block, the unit for memory allocation and file mapping per

atan(3) - arc tangent function (Library - Linux man page)...
The atan() function calculates the principal value of the arc tangent of x; that is the value whose tangent is x. RETURN VALUE On success, these functions retur

utimes(2) - change file last access and modification times
Note: modern applications may prefer to use the interfaces described in utimensat(2). The utime() system call changes the access and modification times of the i

lgammal_r(3) - log gamma function - Linux manual page.......
For the definition of the Gamma function, see tgamma(3). The lgamma() function returns the natural logarithm of the absolute value of the Gamma function. The si

XrmStringToQuark(3) - manipulate resource quarks (Man Page)
The XrmUniqueQuark function allocates a quark that is guaranteed not to represent any string that is known to the resource manager. These functions can be used

XFreeModifierMap(3) - manipulate keyboard encoding and keybo
The XChangeKeyboardMapping function defines the symbols for the specified number of KeyCodes starting with first_keycode. The symbols for KeyCodes outside this

smidump(1) - dump SMI or SPPI modules in various formats....
The smidump program is used to dump the contents of a single MIB or PIB module or a collection of modules to stdout in a selectable output format. This format m

XCreatePixmapCursor(3) - create cursors - Linux manual page
X provides a set of standard cursor shapes in a special font named cursor. Applications are encouraged to use this interface for their cursors because the font

ldap_next_reference(3) - Stepping through continuation refer
These routines are used to step through the continuation references in a result chain received from ldap_result(3) or the synchronous LDAP search operation rout

sem_overview(7) - Overview of POSIX semaphores (Man Page)...
POSIX semaphores allow processes and threads to synchronize their actions. A semaphore is an integer whose value is never allowed to fall below zero. Two operat

calibrate_lens(1) - Lens calibration from straight lines....
OPTIONS -p <filename> Input Hugin PTO file. -j <filename> Input file containing line data. -d <int> Maximum dimension for re-sized image prior to processing. De

We can't live, work or learn in freedom unless the software we use is free.