specs/XKB: fixup various formatting issues in <programlisting>s

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith 2014-07-19 00:48:02 -07:00
parent 70c648ff85
commit 5c3aa4c69e
20 changed files with 904 additions and 953 deletions

View file

@ -56,10 +56,10 @@ keyboard geometry descriptions.
<para>
The name of the Xkb extension is given in
<filename class="headerfile">&lt;X11/extensions/Xkb.h&gt;</filename>:
</para>
<para>
<emphasis>#define XkbName "XKEYBOARD"</emphasis>
<programlisting>
#define XkbName "XKEYBOARD"
</programlisting>
</para>
<para>

View file

@ -113,13 +113,11 @@ function expands the array if necessary.
<para>
For example, call:
</para>
<para>
<programlisting>
XkbAllocGeomShapes(geom,4)
</para>
</programlisting>
<para>
to say <quote>Ill need space for four new shapes in this geometry.</quote>
This makes sure that
<structfield>sz_shapes</structfield>

View file

@ -167,21 +167,17 @@ in the same fields at the beginning of all Xkb event structures and are
described in the
<structname>XkbAnyEvent</structname>
structure:
</para>
<para><programlisting>
<programlisting>
typedef struct {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event
generated */
Time time; /* server time when event generated */
int xkb_type; /* Xkb minor event code */
unsigned int device; /* Xkb device ID, will not be
<symbol>XkbUseCoreKbd</symbol> */
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* Xkb minor event code */
unsigned int device; /* Xkb device ID, will not be <symbol>XkbUseCoreKbd</symbol> */
} <structname>XkbAnyEvent</structname>;
</programlisting></para>
<para>
@ -719,8 +715,8 @@ every reference. For example, to get the next event, you can simply declare a
variable of type
<structname>XkbEvent</structname>
and call:
</para>
<para>XNextEvent(dpy,&amp;xkbev.core);</para>
<programlisting>XNextEvent(dpy,&amp;xkbev.core);</programlisting>
</para>
</sect1>
</chapter>

View file

@ -725,27 +725,27 @@ To latch the keysym group, use
Xkb keyboard state may be represented in an
<structname>XkbStateRec</structname>
structure:
</para>
<para><programlisting>
<programlisting>
typedef struct {
unsigned char group; /* effective group index */
unsigned char base_group; /* base group index */
unsigned char latched_group; /* latched group index */
unsigned char locked_group; /* locked group index */
unsigned char mods; /* effective modifiers */
unsigned char base_mods; /* base modifiers */
unsigned char latched_mods; /* latched modifiers */
unsigned char locked_mods; /* locked modifiers */
unsigned char compat_state; /* effective group &rArr; modifiers */
unsigned char grab_mods; /* modifiers used for grabs */
unsigned char compat_grab_mods; /* mods used for compatibility mode grabs */
unsigned char lookup_mods; /* modifiers used to lookup symbols */
unsigned char compat_lookup_mods; /* mods used for compatibility lookup */
unsigned short ptr_buttons; /* 1 bit &rArr; corresponding pointer btn is down */
}
<structname>XkbStateRec</structname>,
*XkbStatePtr;
unsigned char group; /* effective group index */
unsigned char base_group; /* base group index */
unsigned char latched_group; /* latched group index */
unsigned char locked_group; /* locked group index */
unsigned char mods; /* effective modifiers */
unsigned char base_mods; /* base modifiers */
unsigned char latched_mods; /* latched modifiers */
unsigned char locked_mods; /* locked modifiers */
unsigned char compat_state; /* effective group &rArr; modifiers */
unsigned char grab_mods; /* modifiers used for grabs */
unsigned char compat_grab_mods; /* mods used for compatibility
mode grabs */
unsigned char lookup_mods; /* mods used to lookup symbols */
unsigned char compat_lookup_mods; /* mods used for compatibility
lookup */
unsigned short ptr_buttons; /* 1 bit &rArr; corresponding
pointer btn is down */
} <structname>XkbStateRec</structname>, *XkbStatePtr;
</programlisting></para>
<para>
@ -957,39 +957,41 @@ To receive
The structure for
<symbol>XkbStateNotify</symbol>
events is:
</para>
<para><programlisting>
<programlisting>
typedef struct {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbStateNotify</symbol> */
int device; /* Xkb device ID, will not be <symbol>XkbUseCoreKbd</symbol> */
unsigned int changed; /* bits indicating what has changed */
int group; /* group index of effective group */
int base_group; /* group index of base group */
int latched_group; /* group index of latched group */
int locked_group; /* group index of locked group */
unsigned int mods; /* effective modifiers */
unsigned int base_mods; /* base modifiers */
unsigned int latched_mods; /* latched modifiers */
unsigned int locked_mods; /* locked modifiers */
int compat_state; /* computed compatibility state */
unsigned char grab_mods; /* modifiers used for grabs */
unsigned char compat_grab_mods; /* modifiers used for compatibility grabs */
unsigned char lookup_mods; /* modifiers used to lookup symbols */
unsigned char compat_lookup_mods; /* mods used for compatibility look up */
int ptr_buttons; /* core pointer buttons */
KeyCode keycode; /* keycode causing event, 0 if programmatic */
char event_type; /* core event if <structfield>req_major</structfield> or
<structfield>req_minor</structfield> non zero */
char req_major; /* major request code if program trigger, else 0 */
char req_minor; /* minor request code if program trigger, else 0 */
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbStateNotify</symbol> */
int device; /* Xkb device ID,
will not be <symbol>XkbUseCoreKbd</symbol> */
unsigned int changed; /* bits indicating what has changed */
int group; /* group index of effective group */
int base_group; /* group index of base group */
int latched_group; /* group index of latched group */
int locked_group; /* group index of locked group */
unsigned int mods; /* effective modifiers */
unsigned int base_mods; /* base modifiers */
unsigned int latched_mods; /* latched modifiers */
unsigned int locked_mods; /* locked modifiers */
int compat_state; /* computed compatibility state */
unsigned char grab_mods; /* modifiers used for grabs */
unsigned char compat_grab_mods; /* modifiers used for compatibility grabs */
unsigned char lookup_mods; /* modifiers used to lookup symbols */
unsigned char compat_lookup_mods; /* mods used for compatibility look up */
int ptr_buttons; /* core pointer buttons */
KeyCode keycode; /* keycode causing event,
0 if programmatic */
char event_type; /* core event if <structfield>req_major</structfield> or <structfield>req_minor</structfield>
non zero */
char req_major; /* major request code if program trigger,
else 0 */
char req_minor; /* minor request code if program trigger,
else 0 */
} <structname>XkbStateNotifyEvent</structname>;
</programlisting></para>
<para>

View file

@ -24,30 +24,19 @@ The component structures in the
<para><programlisting>
typedef struct {
struct _XDisplay * display; /* connection to
X server */
unsigned short flags; /* private to Xkb, do
not modify */
unsigned short device_spec; /* device of
interest */
KeyCode min_key_code; /* minimum keycode for
device */
KeyCode max_key_code; /* maximum keycode for
device */
XkbControlsPtr ctrls; /* controls */
XkbServerMapPtr server; /* server keymap */
XkbClientMapPtr map; /* client keymap */
XkbIndicatorPtr indicators; /* indicator map
*/
XkbNamesPtr names; /* names for all
components */
XkbCompatMapPtr compat; /* compatibility map
*/
XkbGeometryPtr geom; /* physical geometry of
keyboard */
}
<structname>XkbDescRec</structname>,
*XkbDescPtr;
struct _XDisplay * display; /* connection to X server */
unsigned short flags; /* private to Xkb, do not modify */
unsigned short device_spec; /* device of interest */
KeyCode min_key_code; /* minimum keycode for device */
KeyCode max_key_code; /* maximum keycode for device */
XkbControlsPtr ctrls; /* controls */
XkbServerMapPtr server; /* server keymap */
XkbClientMapPtr map; /* client keymap */
XkbIndicatorPtr indicators; /* indicator map */
XkbNamesPtr names; /* names for all components */
XkbCompatMapPtr compat; /* compatibility map */
XkbGeometryPtr geom; /* physical geometry of keyboard */
} <structname>XkbDescRec</structname>, *XkbDescPtr;
</programlisting></para>
<para>

View file

@ -131,13 +131,10 @@ entity such as an indicator map, a control, or a key type. (See
<para><programlisting>
typedef struct _XkbMods {
unsigned char mask; /* real_mods | vmods mapped to
real modifiers */
unsigned char real_mods; /* real modifier bits */
unsigned short vmods; /* virtual modifier bits */
}
<structname>XkbModsRec</structname>,
*XkbModsPtr;
unsigned char mask; /* real_mods | vmods mapped to real modifiers */
unsigned char real_mods; /* real modifier bits */
unsigned short vmods; /* virtual modifier bits */
} <structname>XkbModsRec</structname>, *XkbModsPtr;
</programlisting></para>
<para>

View file

@ -87,16 +87,14 @@ The description for all the Xkb indicators is held in the
<structfield>indicators</structfield>
field of the complete keyboard description (see <xref linkend="Complete_Keyboard_Description" />), which is defined
as follows:
</para>
<para><programlisting>
<programlisting>
#define XkbNumIndicators 32
</programlisting></para>
<para><programlisting>
typedef struct {
unsigned long phys_indicators; /* LEDs existence */
XkbIndicatorMapRec maps[XkbNumIndicators]; /* indicator maps */
} <structname>XkbIndicatorRec</structname>,*XkbIndicatorPtr;
unsigned long phys_indicators; /* LEDs existence */
XkbIndicatorMapRec maps[XkbNumIndicators]; /* indicator maps */
} <structname>XkbIndicatorRec</structname>, *XkbIndicatorPtr;
</programlisting></para>
<para>
@ -144,16 +142,15 @@ attributes of each indicator are held in the
array, which is an array of
<structname>XkbIndicatorRec</structname>
structures:
</para>
<para><programlisting>
<programlisting>
typedef struct {
unsigned char flags; /* how the indicator can be changed */
unsigned char which_groups; /* match criteria for groups */
unsigned char groups; /* which keyboard groups the indicator watches */
unsigned char which_mods; /* match criteria for modifiers */
XkbModsRec mods; /* which modifiers the indicator watches */
unsigned int ctrls; /* which controls the indicator watches */
unsigned char flags; /* how the indicator can be changed */
unsigned char which_groups; /* match criteria for groups */
unsigned char groups; /* which keyboard groups the indicator watches */
unsigned char which_mods; /* match criteria for modifiers */
XkbModsRec mods; /* which modifiers the indicator watches */
unsigned int ctrls; /* which controls the indicator watches */
} <structname>XkbIndicatorMapRec</structname>, *XkbIndicatorMapPtr;
</programlisting></para>
@ -322,9 +319,8 @@ corresponding indicator. The
field controls the interpretation of
<structfield>groups</structfield>
and may contain any one of the following values:
</para>
<para><programlisting>
<programlisting>
#define XkbIM_UseNone 0
#define XkbIM_UseBase (1L &lt;&lt; 0)
#define XkbIM_UseLatched (1L &lt;&lt; 1)
@ -339,9 +335,8 @@ The
<structfield>groups</structfield>
field specifies what keyboard groups an indicator watches and is the bitwise
inclusive OR of the following valid values:
</para>
<para><programlisting>
<programlisting>
#define XkbGroup1Mask (1&lt;&lt;0)
#define XkbGroup2Mask (1&lt;&lt;1)
#define XkbGroup3Mask (1&lt;&lt;2)
@ -581,9 +576,8 @@ the definition. (See <xref linkend="Keyboard_State" /> for more information on t
<xref linkend="Virtual_Modifiers" /> for more information on virtual modifiers.) Use a bitwise inclusive
OR of the following values to compose a value for
<structfield>which_mods</structfield>:
</para>
<para><programlisting>
<programlisting>
#define XkbIM_UseNone 0
#define XkbIM_UseBase (1L &lt;&lt; 0)
#define XkbIM_UseLatched (1L &lt;&lt; 1)
@ -800,9 +794,8 @@ The
<structfield>ctrls</structfield>
field specifies what controls (see <xref linkend="Keyboard_Controls" />) the indicator watches and is
composed using the bitwise inclusive OR of the following values:
</para>
<para><programlisting>
<programlisting>
#define XkbRepeatKeysMask (1L &lt;&lt; 0)
#define XkbSlowKeysMask (1L &lt;&lt; 1)
#define XkbBounceKeysMask (1L &lt;&lt; 2)
@ -1609,10 +1602,9 @@ The
<para><programlisting>
typedef struct _XkbIndicatorChanges {
unsigned int state_changes;
unsigned int map_changes;
}
<structname>XkbIndicatorChangesRec</structname>,*XkbIndicatorChangesPtr;
unsigned int state_changes;
unsigned int map_changes;
} <structname>XkbIndicatorChangesRec</structname>,*XkbIndicatorChangesPtr;
</programlisting></para>
<para>
@ -1777,19 +1769,18 @@ those bits that specify the indicators for which you want to receive events.
<para>
Both types of indicator events use the same structure:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbIndicatorNotify {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* specifies state or map notify */
int device; /* Xkb device ID, will not be <symbol>XkbUseCoreKbd</symbol> */
unsigned int changed; /* mask of indicators with new state or map */
unsigned int state; /* current state of all indicators */
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* specifies state or map notify */
int device; /* Xkb device ID, will not be <symbol>XkbUseCoreKbd</symbol> */
unsigned int changed; /* mask of indicators with new state or map */
unsigned int state; /* current state of all indicators */
} <structname>XkbIndicatorNotifyEvent</structname>;
</programlisting></para>

View file

@ -1113,25 +1113,24 @@ can call
The structure for the
<symbol>XkbBellNotify</symbol>
event type contains:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbBellNotify {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbBellNotify</symbol> */
unsigned int device; /* Xkb device ID, will not be <symbol>XkbUseCoreKbd</symbol> */
int percent; /* requested volume as % of max */
int pitch; /* requested pitch in Hz */
int duration; /* requested duration in microseconds */
unsigned int bell_class; /* X input extension feedback class */
unsigned int bell_id; /* X input extension feedback ID */
Atom name; /* "name" of requested bell */
Window window; /* window associated with event */
Bool event_only; /* <symbol>False</symbol> &rarr; the server did not produce a beep */
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbBellNotify</symbol> */
unsigned int device; /* Xkb device ID, will not be <symbol>XkbUseCoreKbd</symbol> */
int percent; /* requested volume as % of max */
int pitch; /* requested pitch in Hz */
int duration; /* requested duration in microseconds */
unsigned int bell_class; /* X input extension feedback class */
unsigned int bell_id; /* X input extension feedback ID */
Atom name; /* "name" of requested bell */
Window window; /* window associated with event */
Bool event_only; /* <symbol>False</symbol> &rarr; the server did not produce a beep */
} <structname>XkbBellNotifyEvent</structname>;
</programlisting></para>

View file

@ -556,41 +556,37 @@ the control is configured to not reset when the client exits. For example:
To leave the auto-reset controls for
<emphasis>StickyKeys</emphasis>
the way they are:
</para>
<para><programlisting>
ok = XkbSetAutoResetControls(dpy, 0, 0, 0);
<programlisting>
ok = XkbSetAutoResetControls(dpy, 0, 0, 0);
</programlisting></para>
<para>
To change the auto-reset controls so that
<emphasis>StickyKeys</emphasis>
are unaffected when the client exits:
</para>
<para><programlisting>
ok = XkbSetAutoResetControls(dpy, XkbStickyKeysMask, 0, 0);
<programlisting>
ok = XkbSetAutoResetControls(dpy, XkbStickyKeysMask, 0, 0);
</programlisting></para>
<para>
To change the auto-reset controls so that
<emphasis>StickyKeys</emphasis>
are turned off when the client exits:
</para>
<para><programlisting>
ok = XkbSetAutoResetControls(dpy, XkbStickyKeysMask, XkbStickyKeysMask, 0);
<programlisting>
ok = XkbSetAutoResetControls(dpy, XkbStickyKeysMask, XkbStickyKeysMask, 0);
</programlisting></para>
<para>
To change the auto-reset controls so that
<emphasis>StickyKeys</emphasis>
are turned on when the client exits:
</para>
<para><programlisting>
ok = XkbSetAutoResetControls(dpy, XkbStickyKeysMask, XkbStickyKeysMask,
XkbStickyKeysMask);
<programlisting>
ok = XkbSetAutoResetControls(dpy, XkbStickyKeysMask, XkbStickyKeysMask,
XkbStickyKeysMask);
</programlisting></para>
<para>
@ -2032,21 +2028,20 @@ The server can generate
events for some of the global keyboard controls. The structure for the
<symbol>XkbAccessXNotify</symbol>
event type is as follows:
</para>
<para><programlisting>
<programlisting>
typedef struct {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbAccessXNotify</symbol> */
int device; /* Xkb device ID, will not be <symbol>XkbUseCoreKbd</symbol> */
int detail; /* XkbAXN_* */
KeyCode keycode; /* key of event */
int slowKeysDelay; /* current SlowKeys delay */
int debounceDelay; /* current debounce delay */
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbAccessXNotify</symbol> */
int device; /* Xkb device ID, will not be <symbol>XkbUseCoreKbd</symbol> */
int detail; /* XkbAXN_* */
KeyCode keycode; /* key of event */
int slowKeysDelay; /* current SlowKeys delay */
int debounceDelay; /* current debounce delay */
} <structname>XkbAccessXNotifyEvent</structname>;
</programlisting></para>
@ -2814,13 +2809,11 @@ with a mask indicating whether the individual
options are on or off. Valid bits in
<parameter>options_rtrn</parameter>
are:
</para>
<para>
<programlisting>
<symbol>XkbAX_TwoKeysMask</symbol>
<symbol>XkbAX_LatchToLockMask</symbol>
</programlisting>
<simplelist type='vert' columns='1'>
<member><symbol>XkbAX_TwoKeysMask</symbol></member>
<member><symbol>XkbAX_LatchToLockMask</symbol></member>
</simplelist>
</para>
<para>
@ -2913,13 +2906,11 @@ The valid bits to use for both the
and
<parameter>values</parameter>
parameters are:
</para>
<para>
<programlisting>
<symbol>XkbAX_TwoKeysMask</symbol>
<symbol>XkbAX_LatchToLockMask</symbol>
</programlisting>
<simplelist type='vert' columns='1'>
<member><symbol>XkbAX_TwoKeysMask</symbol></member>
<member><symbol>XkbAX_LatchToLockMask</symbol></member>
</simplelist>
</para>
<para>
@ -2939,15 +2930,13 @@ The valid bits to use for both the
There are several controls that apply to the keyboard mapping in general. They
control handling of out-of-range group indices and how modifiers are processed
and consumed in the server. These are:
</para>
<para>
<programlisting>
<emphasis>GroupsWrap</emphasis>
<emphasis>IgnoreGroupLock</emphasis>
<emphasis>IgnoreLockMods</emphasis>
<emphasis>InternalMods</emphasis>
</programlisting>
<simplelist type='vert' columns='1'>
<member><emphasis>GroupsWrap</emphasis></member>
<member><emphasis>IgnoreGroupLock</emphasis></member>
<member><emphasis>IgnoreLockMods</emphasis></member>
<member><emphasis>InternalMods</emphasis></member>
</simplelist>
</para>
<para>
@ -3460,39 +3449,45 @@ convenience functions.
The
<structname>XkbControlsRec</structname>
structure is defined as follows:
</para>
<para>
<programlisting>
#define XkbMaxLegalKeyCode 255
#define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8)
</programlisting>
</para>
<para>
<programlisting>
typedef struct {
unsigned char mk_dflt_btn; /* default button for keyboard driven mouse */
unsigned char num_groups; /* number of keyboard groups */
unsigned char groups_wrap; /* how to wrap out-of-bounds groups */
XkbModsRec internal; /* defines server internal modifiers */
XkbModsRec ignore_lock; /* modifiers to ignore when checking for grab */
unsigned int enabled_ctrls; /* 1 bit &rArr; corresponding boolean control enabled */
unsigned short repeat_delay; /* ms delay until first repeat */
unsigned short repeat_interval; /* ms delay between repeats */
unsigned short slow_keys_delay; /* ms minimum time key must be down to be ok */
unsigned short debounce_delay; /* ms delay before key reactivated */
unsigned short mk_delay; /* ms delay to second mouse motion event */
unsigned short mk_interval; /* ms delay between repeat mouse events */
unsigned short mk_time_to_max; /* # intervals until constant mouse move */
unsigned short mk_max_speed; /* multiplier for maximum mouse speed */
short mk_curve; /* determines mouse move curve type */
unsigned short ax_options; /* 1 bit &rArr; Access X option enabled */
unsigned short ax_timeout; /* seconds until Access X disabled */
unsigned short axt_opts_mask; /* 1 bit &rArr; options to reset on Access X timeout */
unsigned short axt_opts_values; /* 1 bit &rArr; turn option on, 0&rArr; off */
unsigned int axt_ctrls_mask; /* which bits in <structfield>enabled_ctrls</structfield> to modify */
unsigned int axt_ctrls_values; /* values for new bits in <structfield>enabled_ctrls</structfield> */
unsigned char per_key_repeat[XkbPerKeyBitArraySize]; /* per key auto repeat */
unsigned char mk_dflt_btn; /* default button for
keyboard driven mouse */
unsigned char num_groups; /* number of keyboard groups */
unsigned char groups_wrap; /* how to wrap out-of-bounds groups */
XkbModsRec internal; /* defines server internal modifiers */
XkbModsRec ignore_lock; /* modifiers to ignore when
checking for grab */
unsigned int enabled_ctrls; /* 1 bit &rArr; corresponding
boolean control enabled */
unsigned short repeat_delay; /* ms delay until first repeat */
unsigned short repeat_interval; /* ms delay between repeats */
unsigned short slow_keys_delay; /* ms minimum time key must be
down to be ok */
unsigned short debounce_delay; /* ms delay before key reactivated */
unsigned short mk_delay; /* ms delay to second mouse
motion event */
unsigned short mk_interval; /* ms delay between repeat mouse
events */
unsigned short mk_time_to_max; /* # intervals until constant
mouse move */
unsigned short mk_max_speed; /* multiplier for maximum mouse speed */
short mk_curve; /* determines mouse move curve type */
unsigned short ax_options; /* 1 bit &rArr; Access X option enabled */
unsigned short ax_timeout; /* seconds until Access X disabled */
unsigned short axt_opts_mask; /* 1 bit &rArr; options to reset
on Access X timeout */
unsigned short axt_opts_values; /* 1 bit &rArr; turn option on, 0&rArr; off */
unsigned int axt_ctrls_mask; /* which bits in <structfield>enabled_ctrls</structfield>
to modify */
unsigned int axt_ctrls_values; /* values for new bits in
<structfield>enabled_ctrls</structfield> */
unsigned char per_key_repeat[XkbPerKeyBitArraySize];
/* per key auto repeat */
} <structname>XkbControlsRec</structname>, *XkbControlsPtr;
</programlisting>
</para>
@ -4188,11 +4183,9 @@ Xkb provides a set of convenience macros for working with the
field of an
<structname>XkbControlsRec</structname>
structure:
</para>
<para><programlisting>
#define <symbol>XkbAX_NeedOption</symbol>
(c,w) ((c)-&gt;ax_options&amp;(w))
<programlisting>
#define <symbol>XkbAX_NeedOption</symbol>(c,w) ((c)-&gt;ax_options &amp; (w))
</programlisting></para>
<para>
@ -4207,15 +4200,11 @@ or not. It accepts a pointer to an
<structfield>ax_options</structfield>
field of the controls structure is set, the macro returns the mask bit.
Otherwise, it returns zero. Thus,
</para>
<programlisting>
XkbAX_NeedOption(ctlrec, XkbAX_LatchToLockMask)
</programlisting>
<para>
XkbAX_NeedOption(ctlrec, XkbAX_LatchToLockMask)
</para>
<para>
is nonzero if the latch to lock transition for latching keys is enabled, and
zero if it is disabled. Note that
<symbol>XkbAX_NeedOption</symbol>
@ -4228,8 +4217,8 @@ operate; the
</para>
<para><programlisting>
#define <symbol>XkbAX_AnyFeedback</symbol>
(c) ((c)-&gt;enabled_ctrls&amp;XkbAccessXFeedbackMask)
#define <symbol>XkbAX_AnyFeedback</symbol>(c) \
((c)-&gt;enabled_ctrls &amp; XkbAccessXFeedbackMask)
</programlisting></para>
<para>
@ -4247,8 +4236,8 @@ Otherwise, it returns zero.
</para>
<para><programlisting>
#define <symbol>XkbAX_NeedFeedback</symbol>
(c,w) (XkbAX_AnyFeedback(c)&amp;&amp;XkbAX_NeedOption(c,w))
#define <symbol>XkbAX_NeedFeedback</symbol>(c,w) \
(XkbAX_AnyFeedback(c) &amp;&amp; XkbAX_NeedOption(c,w))
</programlisting></para>
<para>
@ -4615,15 +4604,16 @@ same
changes, to be propagated to the server. The
<structname>XkbControlsChangesRec</structname>
structure is defined as follows:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbControlsChanges {
unsigned int changed_ctrls; /* bits indicating changed control data */
unsigned int enabled_ctrls_changes; /* bits indicating enabled/disabled controls */
Bool num_groups_changed; /* <symbol>True</symbol> if
number of keyboard groups changed */
} <structname>XkbControlsChangesRec</structname>,*XkbControlsChangesPtr;
unsigned int changed_ctrls; /* bits indicating changed
control data */
unsigned int enabled_ctrls_changes; /* bits indicating
enabled/disabled controls */
Bool num_groups_changed; /* <symbol>True</symbol> if number of keyboard
groups changed */
} <structname>XkbControlsChangesRec</structname>, *XkbControlsChangesPtr;
</programlisting></para>
<para>
@ -4759,25 +4749,27 @@ To receive
The structure for the
<symbol>XkbControlsNotify</symbol>
event is defined as follows:
</para>
<para><programlisting>
<programlisting>
typedef struct {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbCompatMapNotify</symbol> */
int device; /* Xkb device ID, will not be <symbol>XkbUseCoreKbd</symbol> */
unsigned int changed_ctrls; /* bits indicating which controls data have changed*/
unsigned int enabled_ctrls; /* controls currently enabled in server */
unsigned int enabled_ctrl_changes; /* bits indicating enabled/disabled controls */
int num_groups; /* current number of keyboard groups */
KeyCode keycode; /* != 0 &rArr; keycode of key causing change */
char event_type; /* Type of event causing change */
char req_major; /* major event code of event causing change */
char req_minor; /* minor event code of event causing change */
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbCompatMapNotify</symbol> */
int device; /* Xkb device ID,
will not be <symbol>XkbUseCoreKbd</symbol> */
unsigned int changed_ctrls; /* bits indicating which controls
data have changed */
unsigned int enabled_ctrls; /* controls currently enabled in server */
unsigned int enabled_ctrl_changes; /* bits indicating
enabled/disabled controls */
int num_groups; /* current number of keyboard groups */
KeyCode keycode; /* != 0 &rArr; keycode of key causing change */
char event_type; /* Type of event causing change */
char req_major; /* major event code of event causing change */
char req_minor; /* minor event code of event causing change */
} <structname>XkbControlsNotifyEvent</structname>;
</programlisting></para>

View file

@ -70,13 +70,13 @@ involves translating a single keycode into a string. Because these simple
lookups involve only a single keycode, all of the information needed to do the
translation is contained in the keyboard state in a single event. The controls
affecting simple string lookups are:
</para>
<para><programlisting>
<emphasis>ForceLatin1Lookup</emphasis>
<emphasis>ConsumeLookupMods</emphasis>
<emphasis>LevelOneUsesShiftAndLock</emphasis>
</programlisting></para>
<simplelist type='vert' columns='1'>
<member><emphasis>ForceLatin1Lookup</emphasis></member>
<member><emphasis>ConsumeLookupMods</emphasis></member>
<member><emphasis>LevelOneUsesShiftAndLock</emphasis></member>
</simplelist>
</para>
<sect2 id='ForceLatin1Lookup'>
<title>ForceLatin1Lookup</title>
@ -207,13 +207,13 @@ mapping a series of keysyms to a string is known as
<indexterm significance="preferred" zone="Controls_Affecting_Compose_Processing">
<primary>compose processing</primary></indexterm>
The controls affecting compose processing are:
</para>
<para><programlisting>
<emphasis>ConsumeKeysOnComposeFail</emphasis>
<emphasis>ComposeLED</emphasis>
<emphasis>BeepOnComposeFail</emphasis>
</programlisting></para>
<simplelist type='vert' columns='1'>
<member><emphasis>ConsumeKeysOnComposeFail</emphasis></member>
<member><emphasis>ComposeLED</emphasis></member>
<member><emphasis>BeepOnComposeFail</emphasis></member>
</simplelist>
</para>
<para>
Because different vendors have historically used different algorithms to

View file

@ -119,16 +119,16 @@ requesting notification of changes to the legal range of keycodes.
<para>
The following X library functions are modified by Xkb:
</para>
<para><programlisting>
<function>XKeycodeToKeysym</function>
<function>XKeysymToKeycode</function>
<function>XLookupKeysym</function>
<function>XLookupString</function>
<function>XRefreshKeyboardMapping</function>
<function>XRebindKeysym</function>
</programlisting></para>
<simplelist type='vert' columns='1'>
<member><function>XKeycodeToKeysym</function></member>
<member><function>XKeysymToKeycode</function></member>
<member><function>XLookupKeysym</function></member>
<member><function>XLookupString</function></member>
<member><function>XRefreshKeyboardMapping</function></member>
<member><function>XRebindKeysym</function></member>
</simplelist>
</para>
<para>
The implicit support for Xkb replaces a number of X library functions with

View file

@ -672,9 +672,8 @@ while the key specified in over must not be.
<para>
To draw a representation of the keyboard, draw in the following order:
</para>
<para><programlisting>
<programlisting>
Draw the top-level keyboard as a rectangle, using its width and height.
For each component (section or doodad) of the top-level geometry, in priority order:
If component is a section
@ -744,32 +743,40 @@ Xkb Geometry Data Structures (Doodads)</H5>
Xkb Geometry Data Structures (Overlays)</H5>
-->
<para><programlisting>
typedef struct _XkbGeometry { /* top-level keyboard geometry structure */
Atom name; /* keyboard name */
unsigned short width_mm; /* keyboard width in <emphasis>mm</emphasis> / <emphasis>10</emphasis> */
unsigned short height_mm; /* keyboard height in <emphasis>mm</emphasis> / <emphasis>10</emphasis> */
char * label_font; /* font for key labels */
XkbColorPtr label_color; /* color for key labels - pointer into colors array */
XkbColorPtr base_color; /* color for basic keyboard - pointer into colors array */
unsigned short sz_properties; /* size of properties array */
unsigned short sz_colors; /* size of colors array */
unsigned short sz_shapes; /* size of shapes array */
unsigned short sz_sections; /* size of sections array */
unsigned short sz_doodads; /* size of doodads array */
unsigned short sz_key_aliases; /* size of key aliases array */
unsigned short num_properties; /* number of properties in the properties array */
unsigned short num_colors; /* number of colors in the colors array */
unsigned short num_shapes; /* number of shapes in the shapes array */
unsigned short num_sections; /* number of sections in the sections array */
unsigned short num_doodads; /* number of doodads in the doodads array */
unsigned short num_key_aliases; /* number of key aliases in the key */
XkbPropertyPtr properties; /* properties array */
XkbColorPtr colors; /* colors array */
XkbShapePtr shapes; /* shapes array */
XkbSectionPtr sections; /* sections array */
XkbDoodadPtr doodads; /* doodads array */
XkbKeyAliasPtr key_aliases; /* key aliases array */
} <structname>XkbGeometryRec</structname>*XkbGeometryPtr;
typedef struct _XkbGeometry { /* top-level keyboard geometry structure */
Atom name; /* keyboard name */
unsigned short width_mm; /* keyboard width in <emphasis>mm</emphasis> / <emphasis>10</emphasis> */
unsigned short height_mm; /* keyboard height in <emphasis>mm</emphasis> / <emphasis>10</emphasis> */
char * label_font; /* font for key labels */
XkbColorPtr label_color; /* color for key labels
- pointer into colors array */
XkbColorPtr base_color; /* color for basic keyboard
- pointer into colors array */
unsigned short sz_properties; /* size of properties array */
unsigned short sz_colors; /* size of colors array */
unsigned short sz_shapes; /* size of shapes array */
unsigned short sz_sections; /* size of sections array */
unsigned short sz_doodads; /* size of doodads array */
unsigned short sz_key_aliases; /* size of key aliases array */
unsigned short num_properties; /* number of properties in the
properties array */
unsigned short num_colors; /* number of colors in the
colors array */
unsigned short num_shapes; /* number of shapes in the
shapes array */
unsigned short num_sections; /* number of sections in the
sections array */
unsigned short num_doodads; /* number of doodads in the
doodads array */
unsigned short num_key_aliases; /* number of key aliases in the
key_aliases array */
XkbPropertyPtr properties; /* properties array */
XkbColorPtr colors; /* colors array */
XkbShapePtr shapes; /* shapes array */
XkbSectionPtr sections; /* sections array */
XkbDoodadPtr doodads; /* doodads array */
XkbKeyAliasPtr key_aliases; /* key aliases array */
} <structname>XkbGeometryRec</structname>, *XkbGeometryPtr;
</programlisting></para>
<para>
@ -787,59 +794,62 @@ keyboard description.
<para><programlisting>
typedef struct _XkbProperty {
char * name; /* property name */
char * value; /* property value */
} <structname>XkbPropertyRec</structname>,*XkbPropertyPtr;
char * name; /* property name */
char * value; /* property value */
} <structname>XkbPropertyRec</structname>, *XkbPropertyPtr;
</programlisting></para>
<para><programlisting>
typedef struct _XkbColor {
unsigned int pixel; /* color */
char * spec; /* color name */
} <structname>XkbColorRec</structname>,*XkbColorPtr;
unsigned int pixel; /* color */
char * spec; /* color name */
} <structname>XkbColorRec</structname>, *XkbColorPtr;
</programlisting></para>
<para><programlisting>
typedef struct _XkbKeyAliasRec {
char real[XkbKeyNameLength]; /* real name of the key */
char alias[XkbKeyNameLength]; /* alias for the key */
} <structname>XkbKeyAliasRec</structname>,*XkbKeyAliasPtr;
char real[XkbKeyNameLength]; /* real name of the key */
char alias[XkbKeyNameLength]; /* alias for the key */
} <structname>XkbKeyAliasRec</structname>, *XkbKeyAliasPtr;
</programlisting></para>
<para><programlisting>
typedef struct _XkbPoint { /* x,y coordinates */
short x;
short y;
typedef struct _XkbPoint { /* x, y coordinates */
short x;
short y;
} <structname>XkbPointRec</structname>, *XkbPointPtr;
</programlisting></para>
<para><programlisting>
typedef struct _XkbOutline {
unsigned short num_points; /* number of points in the outline */
unsigned short sz_points; /* size of the points array */
unsigned short corner_radius; /* draw corners as circles with this radius */
XkbPointPtr points; /* array of points defining the outline */
unsigned short num_points; /* number of points in the outline */
unsigned short sz_points; /* size of the points array */
unsigned short corner_radius; /* draw corners as circles
with this radius */
XkbPointPtr points; /* array of points defining
the outline */
} <structname>XkbOutlineRec</structname>, *XkbOutlinePtr;
</programlisting></para>
<para><programlisting>
typedef struct _XkbBounds {
short x1,y1; /* upper left corner of the bounds,
in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short x2,y2; /* lower right corner of the bounds, in
<emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short x1, y1; /* upper left corner of the bounds, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short x2, y2; /* lower right corner of the bounds, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
} <structname>XkbBoundsRec</structname>, *XkbBoundsPtr;
</programlisting></para>
<para><programlisting>
typedef struct _XkbShape {
Atom name; /* shapes name */
unsigned short num_outlines; /* number of outlines for the shape */
unsigned short sz_outlines; /* size of the outlines array */
XkbOutlinePtr outlines; /* array of outlines for the shape */
XkbOutlinePtr approx; /* pointer into the array to the approximating outline */
XkbOutlinePtr primary; /* pointer into the array to the primary outline */
XkbBoundsRec bounds; /* bounding box for the shape; encompasses all outlines */
Atom name; /* shapes name */
unsigned short num_outlines; /* number of outlines for the shape */
unsigned short sz_outlines; /* size of the outlines array */
XkbOutlinePtr outlines; /* array of outlines for the shape */
XkbOutlinePtr approx; /* pointer into the array to the
approximating outline */
XkbOutlinePtr primary; /* pointer into the array to the
primary outline */
XkbBoundsRec bounds; /* bounding box for the shape;
encompasses all outlines */
} <structname>XkbShapeRec</structname>, *XkbShapePtr;
</programlisting></para>
@ -855,24 +865,26 @@ in the outlines array, as is the default approximating outline.
</para>
<para><programlisting>
typedef struct _XkbKey { /* key in a row */
XkbKeyNameRec name; /* key name */
short gap; /* gap in <emphasis>mm</emphasis>/<emphasis>10</emphasis> from previous key in row */
unsigned char shape_ndx; /* index of shape for key */
unsigned char color_ndx; /* index of color for key body */
typedef struct _XkbKey { /* key in a row */
XkbKeyNameRec name; /* key name */
short gap; /* gap in <emphasis>mm</emphasis>/<emphasis>10</emphasis> from previous key in row */
unsigned char shape_ndx; /* index of shape for key */
unsigned char color_ndx; /* index of color for key body */
} <structname>XkbKeyRec</structname>, *XkbKeyPtr;
</programlisting></para>
<para><programlisting>
typedef struct _XkbRow { /* row in a section */
short top; /* top coordinate of row origin, relative to sections origin */
short left; /* left coordinate of row origin, relative to sections origin */
unsigned short num_keys; /* number of keys in the keys array */
unsigned short sz_keys; /* size of the keys array */
int vertical; /* <symbol>True</symbol> &rArr;vertical row,
<symbol>False</symbol> &rArr;horizontal row */
XkbKeyPtr keys; /* array of keys in the row*/
XkbBoundsRec bounds; /* bounding box for the row */
typedef struct _XkbRow { /* row in a section */
short top; /* top coordinate of row origin,
relative to sections origin */
short left; /* left coordinate of row origin,
relative to sections origin */
unsigned short num_keys; /* number of keys in the keys array */
unsigned short sz_keys; /* size of the keys array */
int vertical; /* <symbol>True</symbol> &rArr;vertical row,
<symbol>False</symbol> &rArr;horizontal row */
XkbKeyPtr keys; /* array of keys in the row */
XkbBoundsRec bounds; /* bounding box for the row */
} <structname>XkbRowRec</structname>, *XkbRowPtr;
</programlisting></para>
@ -888,22 +900,23 @@ typedef struct _XkbRow { /* row in a section */
<para><programlisting>
typedef struct _XkbOverlayRec {
Atom name; /* overlay name */
XkbSectionPtr section_under; /* the section under this overlay */
unsigned short num_rows; /* number of rows in the rows array */
unsigned short sz_rows; /* size of the rows array */
XkbOverlayRowPtr rows; /* array of rows in the overlay */
XkbBoundsPtr bounds; /* bounding box for the overlay */
} <structname>XkbOverlayRec</structname>,*XkbOverlayPtr;
Atom name; /* overlay name */
XkbSectionPtr section_under; /* the section under this overlay */
unsigned short num_rows; /* number of rows in the rows array */
unsigned short sz_rows; /* size of the rows array */
XkbOverlayRowPtr rows; /* array of rows in the overlay */
XkbBoundsPtr bounds; /* bounding box for the overlay */
} <structname>XkbOverlayRec</structname>, *XkbOverlayPtr;
</programlisting></para>
<para><programlisting>
typedef struct _XkbOverlayRow {
unsigned short row_under; /* index into the row under this overlay row */
unsigned short num_keys; /* number of keys in the keys array */
unsigned short sz_keys; /* size of the keys array */
XkbOverlayKeyPtr keys; /* array of keys in the overlay row */
} <structname>XkbOverlayRowRec</structname>,*XkbOverlayRowPtr;
unsigned short row_under; /* index into the row under this
overlay row */
unsigned short num_keys; /* number of keys in the keys array */
unsigned short sz_keys; /* size of the keys array */
XkbOverlayKeyPtr keys; /* array of keys in the overlay row */
} <structname>XkbOverlayRowRec</structname>, *XkbOverlayRowPtr;
</programlisting></para>
<para>
@ -919,30 +932,32 @@ one pointed to by
<para><programlisting>
typedef struct _XkbOverlayKey {
XkbKeyNameRec over; /* name of this overlay key */
XkbKeyNameRec under; /* name of the key under this overlay key */
} <structname>XkbOverlayKeyRec</structname>,*XkbOverlayKeyPtr;
XkbKeyNameRec over; /* name of this overlay key */
XkbKeyNameRec under; /* name of the key under this overlay key */
} <structname>XkbOverlayKeyRec</structname>, *XkbOverlayKeyPtr;
</programlisting></para>
<para><programlisting>
typedef struct _XkbSection {
Atom name; /* section name */
unsigned char priority; /* drawing priority, 0&rArr;highest, 255&rArr;lowest */
short top; /* top coordinate of section origin */
short left; /* left coordinate of row origin */
unsigned short width; /* section width, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
unsigned short height; /* section height, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short angle; /* angle of section rotation, counterclockwise */
unsigned short num_rows; /* number of rows in the rows array */
unsigned short num_doodads; /* number of doodads in the doodads array */
unsigned short num_overlays; /* number of overlays in the overlays array */
unsigned short sz_rows; /* size of the rows array */
unsigned short sz_doodads; /* size of the doodads array */
unsigned short sz_overlays; /* size of the overlays array */
XkbRowPtr rows; /* section rows array */
XkbDoodadPtr doodads; /* section doodads array */
XkbBoundsRec bounds; /* bounding box for the section, before rotation*/
XkbOverlayPtr overlays; /* section overlays array */
Atom name; /* section name */
unsigned char priority; /* drawing priority, 0&rArr;highest, 255&rArr;lowest */
short top; /* top coordinate of section origin */
short left; /* left coordinate of row origin */
unsigned short width; /* section width, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
unsigned short height; /* section height, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short angle; /* angle of section rotation,
counterclockwise */
unsigned short num_rows; /* number of rows in the rows array */
unsigned short num_doodads; /* number of doodads in the doodads array */
unsigned short num_overlays; /* number of overlays in the overlays array */
unsigned short sz_rows; /* size of the rows array */
unsigned short sz_doodads; /* size of the doodads array */
unsigned short sz_overlays; /* size of the overlays array */
XkbRowPtr rows; /* section rows array */
XkbDoodadPtr doodads; /* section doodads array */
XkbBoundsRec bounds; /* bounding box for the section,
before rotation */
XkbOverlayPtr overlays; /* section overlays array */
} <structname>XkbSectionRec</structname>, *XkbSectionPtr;
</programlisting></para>
@ -981,11 +996,11 @@ The doodad structures form a union:
<para><programlisting>
typedef union _XkbDoodad {
XkbAnyDoodadRec any;
XkbShapeDoodadRec shape;
XkbTextDoodadRec text;
XkbIndicatorDoodadRec indicator;
XkbLogoDoodadRec logo;
XkbAnyDoodadRec any;
XkbShapeDoodadRec shape;
XkbTextDoodadRec text;
XkbIndicatorDoodadRec indicator;
XkbLogoDoodadRec logo;
} <structname>XkbDoodadRec</structname>, *XkbDoodadPtr;
</programlisting></para>
@ -1016,61 +1031,65 @@ relative to the keyboards origin if the doodad is in the
<para><programlisting>
typedef struct _XkbShapeDoodad {
Atom name; /* doodad name */
unsigned char type; /* <symbol>XkbOutlineDoodad</symbol>
or <symbol>XkbSolidDoodad</symbol> */
unsigned char priority; /* drawing priority,
0&rArr;highest, 255&rArr;lowest */
short top; /* top coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short left; /* left coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short angle; /* angle of rotation, clockwise, in <emphasis>1</emphasis>/<emphasis>10</emphasis> degrees */
unsigned short color_ndx; /* doodad color */
unsigned short shape_ndx; /* doodad shape */
Atom name; /* doodad name */
unsigned char type; /* <symbol>XkbOutlineDoodad</symbol>
or <symbol>XkbSolidDoodad</symbol> */
unsigned char priority; /* drawing priority,
0&rArr;highest, 255&rArr;lowest */
short top; /* top coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short left; /* left coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short angle; /* angle of rotation, clockwise,
in <emphasis>1</emphasis>/<emphasis>10</emphasis> degrees */
unsigned short color_ndx; /* doodad color */
unsigned short shape_ndx; /* doodad shape */
} <structname>XkbShapeDoodadRec</structname>, *XkbShapeDoodadPtr;
</programlisting></para>
<para><programlisting>
typedef struct _XkbTextDoodad {
Atom name; /* doodad name */
unsigned char type; /* <symbol>XkbTextDoodad</symbol> */
unsigned char priority; /* drawing priority,
0&rArr;highest, 255&rArr;lowest */
short top; /* top coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short left; /* left coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short angle; /* angle of rotation, clockwise, in <emphasis>1</emphasis>/<emphasis>10</emphasis> degrees */
short width; /* width in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short height; /* height in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
unsigned short color_ndx; /* doodad color */
char * text; /* doodad text */
char * font; /* arbitrary font name for doodad text */
Atom name; /* doodad name */
unsigned char type; /* <symbol>XkbTextDoodad</symbol> */
unsigned char priority; /* drawing priority,
0&rArr;highest, 255&rArr;lowest */
short top; /* top coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short left; /* left coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short angle; /* angle of rotation, clockwise,
in <emphasis>1</emphasis>/<emphasis>10</emphasis> degrees */
short width; /* width in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short height; /* height in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
unsigned short color_ndx; /* doodad color */
char * text; /* doodad text */
char * font; /* arbitrary font name for doodad text */
} <structname>XkbTextDoodadRec</structname>, *XkbTextDoodadPtr;
</programlisting></para>
<para><programlisting>
typedef struct _XkbIndicatorDoodad {
Atom name; /* doodad name */
unsigned char type; /* <symbol>XkbIndicatorDoodad</symbol> */
unsigned char priority; /* drawing priority, 0&rArr;highest, 255&rArr;lowest */
short top; /* top coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short left; /* left coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short angle; /* angle of rotation, clockwise, in <emphasis>1</emphasis>/<emphasis>10</emphasis> degrees */
unsigned short shape_ndx; /* doodad shape */
unsigned short on_color_ndx; /* color for doodad if indicator is on */
unsigned short off_color_ndx; /* color for doodad if indicator is off */
Atom name; /* doodad name */
unsigned char type; /* <symbol>XkbIndicatorDoodad</symbol> */
unsigned char priority; /* drawing priority, 0&rArr;highest, 255&rArr;lowest */
short top; /* top coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short left; /* left coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short angle; /* angle of rotation, clockwise,
in <emphasis>1</emphasis>/<emphasis>10</emphasis> degrees */
unsigned short shape_ndx; /* doodad shape */
unsigned short on_color_ndx; /* color for doodad if indicator is on */
unsigned short off_color_ndx;/* color for doodad if indicator is off */
} <structname>XkbIndicatorDoodadRec</structname>, *XkbIndicatorDoodadPtr;
</programlisting></para>
<para><programlisting>
typedef struct _XkbLogoDoodad {
Atom name; /* doodad name */
unsigned char type; /* <symbol>XkbLogoDoodad</symbol> */
unsigned char priority; /* drawing priority, 0&rArr;highest, 255&rArr;lowest */
short top; /* top coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short left; /* left coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short angle; /* angle of rotation, clockwise, in <emphasis>1</emphasis>/<emphasis>10</emphasis> degrees */
unsigned short color_ndx; /* doodad color */
unsigned short shape_ndx; /* doodad shape */
char * logo_name; /* text for logo */
Atom name; /* doodad name */
unsigned char type; /* <symbol>XkbLogoDoodad</symbol> */
unsigned char priority; /* drawing priority, 0&rArr;highest, 255&rArr;lowest */
short top; /* top coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short left; /* left coordinate, in <emphasis>mm</emphasis>/<emphasis>10</emphasis> */
short angle; /* angle of rotation, clockwise,
in <emphasis>1</emphasis>/<emphasis>10</emphasis> degrees */
unsigned short color_ndx; /* doodad color */
unsigned short shape_ndx; /* doodad shape */
char * logo_name; /* text for logo */
} <structname>XkbLogoDoodadRec</structname>, *XkbLogoDoodadPtr
</programlisting></para>
@ -4255,9 +4274,8 @@ To free an entire geometry, use
<para>
The values of which and free_all determine how much of the specified geometry
is freed. The valid values for which are:
</para>
<para><programlisting>
<programlisting>
#define XkbGeomPropertiesMask (1&lt;&lt;0)
#define XkbGeomColorsMask (1&lt;&lt;1)
#define XkbGeomShapesMask (1&lt;&lt;2)

View file

@ -483,9 +483,8 @@ information on these functions.
<para>
Xkb defines combinations of these masks for convenience:
</para>
<para><programlisting>
<programlisting>
#define XkbResizableInfoMask (XkbKeyTypesMask)
#define XkbAllClientInfoMask (XkbKeyTypesMask | XkbKeySymsMask |
XkbModifierMapMask)
@ -723,43 +722,43 @@ components and to reduce the amount of traffic between the server and clients.
<para><programlisting>
typedef struct _XkbMapChanges {
unsigned short changed; /* identifies valid components
in structure */
KeyCode min_key_code; /* lowest numbered keycode for
device */
KeyCode max_key_code; /* highest numbered keycode for
device */
unsigned char first_type; /* index of first key <structfield>type</structfield>
modified */
unsigned char num_types; /* # types modified */
KeyCode first_key_sym; /* first key whose <structfield>key_sym_map</structfield>
changed */
unsigned char num_key_syms; /* # <structfield>key_sym_map</structfield>
entries changed */
KeyCode first_key_act; /* first key whose <structfield>key_acts</structfield>
entry changed */
unsigned char num_key_acts; /* # <structfield>key_acts</structfield>
entries changed */
KeyCode first_key_behavior; /* first key whose <structfield>behaviors</structfield>
changed */
unsigned char num_key_behaviors; /* # <structfield>behaviors</structfield>
entries changed */
KeyCode first_key_explicit; /* first key whose <structfield>explicit</structfield>
entry changed */
unsigned char num_key_explicit; /* # <structfield>explicit</structfield>
entries changed */
KeyCode first_modmap_key; /* first key whose <structfield>modmap</structfield>
entry changed */
unsigned char num_modmap_keys; /* # <structfield>modmap</structfield>
entries changed */
KeyCode first_vmodmap_key; /* first key whose <structfield>vmodmap</structfield>
changed */
unsigned char num_vmodmap_keys; /* # <structfield>vmodmap</structfield>
entries changed */
unsigned char pad1; /* reserved */
unsigned short vmods; /* mask indicating which <structfield>vmods</structfield>
changed */
} <structname>XkbMapChangesRec</structname>,*XkbMapChangesPtr;
unsigned short changed; /* identifies valid components
in structure */
KeyCode min_key_code; /* lowest numbered keycode for
device */
KeyCode max_key_code; /* highest numbered keycode for
device */
unsigned char first_type; /* index of first key <structfield>type</structfield>
modified */
unsigned char num_types; /* # types modified */
KeyCode first_key_sym; /* first key whose <structfield>key_sym_map</structfield>
changed */
unsigned char num_key_syms; /* # <structfield>key_sym_map</structfield>
entries changed */
KeyCode first_key_act; /* first key whose <structfield>key_acts</structfield>
entry changed */
unsigned char num_key_acts; /* # <structfield>key_acts</structfield>
entries changed */
KeyCode first_key_behavior; /* first key whose <structfield>behaviors</structfield>
changed */
unsigned char num_key_behaviors; /* # <structfield>behaviors</structfield>
entries changed */
KeyCode first_key_explicit; /* first key whose <structfield>explicit</structfield>
entry changed */
unsigned char num_key_explicit; /* # <structfield>explicit</structfield>
entries changed */
KeyCode first_modmap_key; /* first key whose <structfield>modmap</structfield>
entry changed */
unsigned char num_modmap_keys; /* # <structfield>modmap</structfield>
entries changed */
KeyCode first_vmodmap_key; /* first key whose <structfield>vmodmap</structfield>
changed */
unsigned char num_vmodmap_keys; /* # <structfield>vmodmap</structfield>
entries changed */
unsigned char pad1; /* reserved */
unsigned short vmods; /* mask indicating which <structfield>vmods</structfield>
changed */
} <structname>XkbMapChangesRec</structname>, *XkbMapChangesPtr;
</programlisting></para>
<para>
@ -1029,36 +1028,35 @@ To receive
The structure for
<symbol>XkbMapNotify</symbol>
events is:
</para>
<para><programlisting>
<programlisting>
typedef struct {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbMapNotify</symbol> */
int device; /* Xkb device ID, will not be <symbol>XkbUseCoreKbd</symbol> */
unsigned int changed; /* identifies valid fields in rest of event */
unsigned int resized; /* reserved */
int first_type; /* index of first key <structfield>type</structfield> modified */
int num_types /* # types modified */
KeyCode min_key_code; /* minimum keycode for device */
KeyCode max_key_code; /* maximum keycode for device */
KeyCode first_key_sym; /* first key whose <structfield>key_sym_map</structfield> changed */
KeyCode first_key_act; /* first key whose <structfield>key_acts</structfield> entry changed */
KeyCode first_key_behavior; /* first key whose <structfield>behaviors</structfield> changed */
KeyCode first_key_explicit; /* first key whose <structfield>explicit</structfield> entry changed */
KeyCode first_modmap_key; /* first key whose <structfield>modmap</structfield> entry changed */
KeyCode first_vmodmap_key; /* # <structfield>modmap</structfield> entries changed */
int num_key_syms; /* # <structfield>key_sym_map</structfield> entries changed */
int num_key_acts; /* # <structfield>key_acts</structfield> entries changed */
int num_key_behaviors; /* # <structfield>behaviors</structfield> entries changed */
int num_key_explicit; /* # <structfield>explicit</structfield> entries changed */
int num_modmap_keys; /* # <structfield>modmap</structfield> entries changed */
int num_vmodmap_keys; /* # <structfield>vmodmap</structfield> entries changed */
unsigned int vmods; /* mask indicating which <structfield>vmods</structfield> changed */
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbMapNotify</symbol> */
int device; /* Xkb device ID, will not be <symbol>XkbUseCoreKbd</symbol> */
unsigned int changed; /* identifies valid fields in rest of event */
unsigned int resized; /* reserved */
int first_type; /* index of first key <structfield>type</structfield> modified */
int num_types /* # types modified */
KeyCode min_key_code; /* minimum keycode for device */
KeyCode max_key_code; /* maximum keycode for device */
KeyCode first_key_sym; /* first key whose <structfield>key_sym_map</structfield> changed */
KeyCode first_key_act; /* first key whose <structfield>key_acts</structfield> entry changed */
KeyCode first_key_behavior; /* first key whose <structfield>behaviors</structfield> changed */
KeyCode first_key_explicit; /* first key whose <structfield>explicit</structfield> entry changed */
KeyCode first_modmap_key; /* first key whose <structfield>modmap</structfield> entry changed */
KeyCode first_vmodmap_key; /* # <structfield>modmap</structfield> entries changed */
int num_key_syms; /* # <structfield>key_sym_map</structfield> entries changed */
int num_key_acts; /* # <structfield>key_acts</structfield> entries changed */
int num_key_behaviors; /* # <structfield>behaviors</structfield> entries changed */
int num_key_explicit; /* # <structfield>explicit</structfield> entries changed */
int num_modmap_keys; /* # <structfield>modmap</structfield> entries changed */
int num_vmodmap_keys; /* # <structfield>vmodmap</structfield> entries changed */
unsigned int vmods; /* mask indicating which <structfield>vmods</structfield> changed */
} <structname>XkbMapNotifyEvent</structname>;
</programlisting></para>

View file

@ -38,20 +38,18 @@ The
<structfield>map</structfield>
field of the complete Xkb keyboard description (see <link linkend="The_XkbDescRec_Structure">section 6.1</link>) is a pointer
to the Xkb client map, which is of type
<structname>XkbClientMapRec</structname>
:
</para>
<structname>XkbClientMapRec</structname>:
<para><programlisting>
typedef struct { /* Client Map */
unsigned char size_types; /* # occupied entries in <structfield>types</structfield> */
unsigned char num_types; /* # entries in <structfield>types</structfield> */
XkbKeyTypePtr types; /* vector of key types used by this keymap */
unsigned short size_syms; /* length of the <structfield>syms</structfield> array */
unsigned short num_syms; /* # entries in <structfield>syms</structfield> */
KeySym * syms; /* linear 2d tables of keysyms, 1 per key */
XkbSymMapPtr key_sym_map; /* 1 per keycode, maps keycode to <structfield>syms</structfield> */
unsigned char * modmap; /* 1 per keycode, real mods bound to key */
<programlisting>
typedef struct { /* Client Map */
unsigned char size_types; /* # occupied entries in <structfield>types</structfield> */
unsigned char num_types; /* # entries in <structfield>types</structfield> */
XkbKeyTypePtr types; /* vector of key types used by this keymap */
unsigned short size_syms; /* length of the <structfield>syms</structfield> array */
unsigned short num_syms; /* # entries in <structfield>syms</structfield> */
KeySym * syms; /* linear 2d tables of keysyms, 1 per key */
XkbSymMapPtr key_sym_map; /* 1 per keycode, maps keycode to <structfield>syms</structfield> */
unsigned char * modmap; /* 1 per keycode, real mods bound to key */
} <structname>XkbClientMapRec</structname>, *XkbClientMapPtr;
</programlisting></para>
@ -76,34 +74,31 @@ description are held in the
and whose total number of valid entries is stored in
<structfield>num_types</structfield>.
Key types are defined using the following structures:
</para>
<para><programlisting>
typedef struct { /* Key Type */
XkbModsRec mods; /* modifiers used to compute shift
level */
unsigned char num_levels; /* total # shift levels, do not
modify directly */
unsigned char map_count; /* # entries in <structfield>map</structfield>,
<structfield>preserve</structfield>
(if non-<symbol>NULL</symbol>) */
XkbKTMapEntryPtr map; /* vector of modifiers for each
shift level */
XkbModsPtr preserve; /* mods to preserve for corresponding
<structfield>map</structfield> entry */
Atom name; /* name of key type */
Atom * level_names; /* array of names of each shift level */
<programlisting>
typedef struct { /* Key Type */
XkbModsRec mods; /* modifiers used to compute shift level */
unsigned char num_levels; /* total # shift levels, do not
modify directly */
unsigned char map_count; /* # entries in <structfield>map</structfield>, <structfield>preserve</structfield>
(if non-<symbol>NULL</symbol>) */
XkbKTMapEntryPtr map; /* vector of modifiers for each
shift level */
XkbModsPtr preserve; /* mods to preserve for
corresponding <structfield>map</structfield> entry */
Atom name; /* name of key type */
Atom * level_names; /* array of names of each shift level */
} <structname>XkbKeyTypeRec</structname>, *XkbKeyTypePtr;
</programlisting></para>
</programlisting>
<para><programlisting>
typedef struct { /* Modifiers for a key type */
Bool active; /* <symbol>True</symbol> &rArr; entry
active when determining shift level */
unsigned char level; /* shift level if modifiers match <structfield>mods</structfield> */
XkbModsRec mods; /* mods needed for this level to be
selected */
} <structname>XkbKTMapEntryRec</structname>,*XkbKTMapEntryPtr;
<programlisting>
typedef struct { /* Modifiers for a key type */
Bool active; /* <symbol>True</symbol> &rArr; entry active when
determining shift level */
unsigned char level; /* shift level if modifiers match <structfield>mods</structfield> */
XkbModsRec mods; /* mods needed for this level to be
selected */
} <structname>XkbKTMapEntryRec</structname>, *XkbKTMapEntryPtr;
</programlisting></para>
<para>
@ -412,14 +407,14 @@ first
entries of the
<structfield>types</structfield>
field of the client map and are indexed using the following constants:
</para>
<para><programlisting>
<symbol>XkbOneLevelIndex</symbol>
<symbol>XkbTwoLevelIndex</symbol>
<symbol>XkbAlphabeticIndex</symbol>
<symbol>XkbKeypadIndex</symbol>
</programlisting></para>
<simplelist type='vert' columns='1'>
<member><symbol>XkbOneLevelIndex</symbol></member>
<member><symbol>XkbTwoLevelIndex</symbol></member>
<member><symbol>XkbAlphabeticIndex</symbol></member>
<member><symbol>XkbKeypadIndex</symbol></member>
</simplelist>
</para>
<sect3 id='ONE_LEVEL'>
<title>ONE_LEVEL</title>
@ -1254,19 +1249,19 @@ have
arrays, whether or not any key actually yields that code. The
<structname>KeySymMapRec</structname>
structure is defined as follows:
</para>
<para><programlisting>
<programlisting>
#define XkbNumKbdGroups 4
#define XkbMaxKbdGroup (XkbNumKbdGroups-1)
</programlisting></para>
<para><programlisting>
typedef struct { /* map to keysyms for a single keycode */
unsigned char kt_index[XkbNumKbdGroups]; /* key type index for each group */
unsigned char group_info; /* # of groups and out of range group handling */
unsigned char width; /* max # of shift levels for key */
unsigned short offset; /* index to keysym table in <structfield>syms</structfield> array */
typedef struct { /* map to keysyms for a single keycode */
unsigned char kt_index[XkbNumKbdGroups];
/* key type index for each group */
unsigned char group_info; /* # of groups and out of range
group handling */
unsigned char width; /* max # of shift levels for key */
unsigned short offset; /* index to keysym table in
<structfield>syms</structfield> array */
} <structname>XkbSymMapRec</structname>, *XkbSymMapPtr;
</programlisting></para>

View file

@ -33,24 +33,24 @@ Server Map Relationships</H5>
<para>
The Xkb server map contains the information the server needs to interpret key
events and is of type
<structname>XkbServerMapRec</structname>
:
</para>
<structname>XkbServerMapRec</structname>:
<para><programlisting>
<programlisting>
#define XkbNumVirtualMods 16
</programlisting></para>
<para><programlisting>
typedef struct { /* Server Map */
unsigned short num_acts; /* # of occupied entries in <structfield>acts</structfield> */
unsigned short size_acts; /* # of entries in <structfield>acts</structfield> */
XkbAction * acts; /* linear 2d tables of key actions, 1 per keycode */
XkbBehavior * behaviors; /* key behaviors,1 per keycode */
unsigned short * key_acts; /* index into <structfield>acts</structfield> , 1 per keycode */
unsigned char * explicit; /* explicit overrides of core remapping, 1 per key */
unsigned char vmods[XkbNumVirtualMods]; /* real mods bound to virtual mods */
unsigned short * vmodmap; /* virtual mods bound to key, 1 per keycode*/
typedef struct { /* Server Map */
unsigned short num_acts; /* # of occupied entries in <structfield>acts</structfield> */
unsigned short size_acts; /* # of entries in <structfield>acts</structfield> */
XkbAction * acts; /* linear 2d tables of key actions,
1 per keycode */
XkbBehavior * behaviors; /* key behaviors, 1 per keycode */
unsigned short * key_acts; /* index into <structfield>acts</structfield>, 1 per keycode */
unsigned char * explicit; /* explicit overrides of core
remapping, 1 per key */
unsigned char vmods[XkbNumVirtualMods]; /* real mods bound
to virtual mods */
unsigned short * vmodmap; /* virtual mods bound to key,
1 per keycode */
} <structname>XkbServerMapRec</structname>, *XkbServerMapPtr;
</programlisting></para>
@ -438,24 +438,23 @@ corresponding to
The description for an action is held in an
<structname>XkbAction</structname>
structure, which is a union of all possible Xkb action types:
</para>
<para><programlisting>
<programlisting>
typedef union _XkbAction {
XkbAnyAction any;
XkbModAction mods;
XkbGroupAction group;
XkbISOAction iso;
XkbPtrAction ptr;
XkbPtrBtnAction btn;
XkbPtrDfltAction dflt;
XkbSwitchScreenAction screen;
XkbCtrlsAction ctrls;
XkbMessageAction msg;
XkbRedirectKeyAction redirect;
XkbDeviceBtnAction devbtn;
XkbDeviceValuatorAction devval;
unsigned char type;
XkbAnyAction any;
XkbModAction mods;
XkbGroupAction group;
XkbISOAction iso;
XkbPtrAction ptr;
XkbPtrBtnAction btn;
XkbPtrDfltAction dflt;
XkbSwitchScreenAction screen;
XkbCtrlsAction ctrls;
XkbMessageAction msg;
XkbRedirectKeyAction redirect;
XkbDeviceBtnAction devbtn;
XkbDeviceValuatorAction devval;
unsigned char type;
} <structname>XkbAction</structname>;
</programlisting></para>
@ -476,16 +475,13 @@ structures for each action in detail.
The
<structname>XkbAnyAction</structname>
structure is a convenience structure that refers to any of the actions:
</para>
<para><programlisting>
<programlisting>
#define XkbAnyActionDataSize 7
</programlisting></para>
<para><programlisting>
typedef struct _XkbAnyAction {
unsigned char type; /* type of action; determines interpretation for data */
unsigned char data[XkbAnyActionDataSize];
unsigned char type; /* type of action; determines interpretation for data */
unsigned char data[XkbAnyActionDataSize];
} <structname>XkbAnyAction</structname>;
</programlisting></para>
@ -629,16 +625,20 @@ Actions associated with the
<structname>XkbModAction</structname>
structure change the state of the modifiers when keys are pressed and released
(see <xref linkend="Virtual_Modifiers" /> for a discussion of modifiers):
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbModAction {
unsigned char type; /* <symbol>XkbSA_{Set|Latch|Lock}Mods</symbol> */
unsigned char flags; /* with <structfield>type</structfield> , controls the effect on modifiers */
unsigned char mask; /* same as <structfield>mask</structfield> field of a modifier description */
unsigned char real_mods; /* same as <structfield>real_mods</structfield> field of a modifier description */
unsigned char vmods1; /* derived from <structfield>vmods</structfield> field of a modifier description */
unsigned char vmods2; /* derived from <structfield>vmods</structfield> field of a modifier description */
unsigned char type; /* <symbol>XkbSA_{Set|Latch|Lock}Mods</symbol> */
unsigned char flags; /* with <structfield>type</structfield>, controls the effect
on modifiers */
unsigned char mask; /* same as <structfield>mask</structfield> field of
a modifier description */
unsigned char real_mods; /* same as <structfield>real_mods</structfield> field of
a modifier description */
unsigned char vmods1; /* derived from <structfield>vmods</structfield> field of
a modifier description */
unsigned char vmods2; /* derived from <structfield>vmods</structfield> field of
a modifier description */
} <structname>XkbModAction</structname>;
</programlisting></para>
@ -1005,13 +1005,12 @@ Actions associated with the
<structname>XkbGroupAction</structname>
structure change the current group state when keys are pressed and released
(see <xref linkend="Keyboard_State" /> for a description of groups and keyboard state):
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbGroupAction {
unsigned char type; /* <symbol>XkbSA_{Set|Latch|Lock}Group</symbol> */
unsigned char flags; /* with <structfield>type</structfield> , controls the effect on groups */
char group_XXX; /* represents a group index or delta */
unsigned char type; /* <symbol>XkbSA_{Set|Latch|Lock}Group</symbol> */
unsigned char flags; /* with <structfield>type</structfield> , controls the effect on groups */
char group_XXX; /* represents a group index or delta */
} <structname>XkbGroupAction</structname>;
</programlisting></para>
@ -1300,16 +1299,15 @@ type XkbAction, these macros may only be used with Actions of type
Actions associated with the
<structname>XkbPtrAction</structname>
structure move the pointer when keys are pressed and released:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbPtrAction {
unsigned char type; /* <symbol>XkbSA_MovePtr</symbol> */
unsigned char flags; /* determines type of pointer motion */
unsigned char high_XXX; /* x coordinate, high bits*/
unsigned char low_XXX; /* y coordinate, low bits */
unsigned char high_YYY; /* x coordinate, high bits */
unsigned char low_YYY; /* y coordinate, low bits */
unsigned char type; /* <symbol>XkbSA_MovePtr</symbol> */
unsigned char flags; /* determines type of pointer motion */
unsigned char high_XXX; /* x coordinate, high bits */
unsigned char low_XXX; /* y coordinate, low bits */
unsigned char high_YYY; /* x coordinate, high bits */
unsigned char low_YYY; /* y coordinate, low bits */
} <structname>XkbPtrAction</structname>;
</programlisting></para>
@ -1594,14 +1592,15 @@ Actions associated with the
<structname>XkbPtrBtnAction</structname>
structure simulate the press and release of pointer buttons when keys are
pressed and released:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbPtrBtnAction {
unsigned char type; /* <symbol>XkbSA_PtrBtn</symbol>, <symbol>XkbSA_LockPtrBtn</symbol> */
unsigned char flags; /* with <structfield>type</structfield> , controls the effect on pointer buttons*/
unsigned char count; /* controls number of ButtonPress and ButtonRelease events */
unsigned char button; /* pointer button to simulate */
unsigned char type; /* <symbol>XkbSA_PtrBtn</symbol>, <symbol>XkbSA_LockPtrBtn</symbol> */
unsigned char flags; /* with <structfield>type</structfield>, controls the effect
on pointer buttons */
unsigned char count; /* controls number of ButtonPress and
ButtonRelease events */
unsigned char button; /* pointer button to simulate */
} <structname>XkbPtrBtnAction</structname>;
</programlisting></para>
@ -1815,14 +1814,13 @@ Actions associated with the
attribute of the
<emphasis>MouseKeys</emphasis>
control (see <link linkend="The_MouseKeys_Control">section 10.5.1</link>):
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbPtrDfltAction {
unsigned char type; /* <symbol>XkbSA_SetPtrDflt</symbol> */
unsigned char flags; /* controls the pointer button number */
unsigned char affect; /* <symbol>XkbSA_AffectDfltBtn</symbol> */
char valueXXX; /* new default button member */
unsigned char type; /* <symbol>XkbSA_SetPtrDflt</symbol> */
unsigned char flags; /* controls the pointer button number */
unsigned char affect; /* <symbol>XkbSA_AffectDfltBtn</symbol> */
char valueXXX; /* new default button member */
} <structname>XkbPtrDfltAction</structname>;
</programlisting></para>
@ -2049,14 +2047,20 @@ The
<para><programlisting>
typedef struct _XkbISOAction {
unsigned char type; /* <symbol>XkbSA_ISOLock</symbol> */
unsigned char flags; /* controls changes to group or modifier state */
unsigned char mask; /* same as <structfield>mask</structfield> field of a modifier description */
unsigned char real_mods; /* same as <structfield>real_mods</structfield> field of a modifier description */
char group_XXX; /* group index or delta group */
unsigned char affect; /* specifies whether to affect mods, group, ptrbtn, or controls*/
unsigned char vmods1; /* derived from <structfield>vmods</structfield> field of a modifier description */
unsigned char vmods2; /* derived from <structfield>vmods</structfield> field of a modifier description */
unsigned char type; /* <symbol>XkbSA_ISOLock</symbol> */
unsigned char flags; /* controls changes to group or
modifier state */
unsigned char mask; /* same as <structfield>mask</structfield> field of
a modifier description */
unsigned char real_mods; /* same as <structfield>real_mods</structfield> field of
a modifier description */
char group_XXX; /* group index or delta group */
unsigned char affect; /* specifies whether to affect
mods, group, ptrbtn, or controls */
unsigned char vmods1; /* derived from <structfield>vmods</structfield> field of
a modifier description */
unsigned char vmods2; /* derived from <structfield>vmods</structfield> field of
a modifier description */
} <structname>XkbISOAction</structname>;
</programlisting></para>
@ -2455,9 +2459,9 @@ Otherwise, key press and key release events do not generate an event.
<para><programlisting>
typedef struct _XkbSwitchScreenAction {
unsigned char type; /* <symbol>XkbSA_SwitchScreen</symbol> */
unsigned char flags; /* controls screen switching */
char screenXXX; /* screen number or delta */
unsigned char type; /* <symbol>XkbSA_SwitchScreen</symbol> */
unsigned char flags; /* controls screen switching */
char screenXXX; /* screen number or delta */
} <structname>XkbSwitchScreenAction</structname>;
</programlisting></para>
@ -2614,22 +2618,21 @@ signed character value for screen numbers in
Actions associated with the
<structname>XkbCtrlsAction</structname>
structure change the state of the boolean controls (see <link linkend="Controls_that_Enable_and_Disable_Other_Controls">section 10.1</link>):
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbCtrlsAction {
unsigned char type; /* <symbol>XkbSA_SetControls</symbol>,
<symbol>XkbSA_LockControls</symbol> */
unsigned char flags; /* with <structfield>type</structfield>,
controls enabling and disabling of controls */
unsigned char ctrls3; /* <structfield>ctrls0</structfield> through
<structfield>ctrls3</structfield> represent the boolean controls */
unsigned char ctrls2; /* <structfield>ctrls0</structfield> through
<structfield>ctrls3</structfield> represent the boolean controls */
unsigned char ctrls1; /* <structfield>ctrls0</structfield> through
<structfield>ctrls3</structfield> represent the boolean controls */
unsigned char ctrls0; /* <structfield>ctrls0</structfield> through
<structfield>ctrls3</structfield> represent the boolean controls */
unsigned char type; /* <symbol>XkbSA_SetControls</symbol>,
<symbol>XkbSA_LockControls</symbol> */
unsigned char flags; /* with <structfield>type</structfield>, controls enabling
and disabling of controls */
unsigned char ctrls3; /* <structfield>ctrls0</structfield> through <structfield>ctrls3</structfield>
represent the boolean controls */
unsigned char ctrls2; /* <structfield>ctrls0</structfield> through <structfield>ctrls3</structfield>
represent the boolean controls */
unsigned char ctrls1; /* <structfield>ctrls0</structfield> through <structfield>ctrls3</structfield>
represent the boolean controls */
unsigned char ctrls0; /* <structfield>ctrls0</structfield> through <structfield>ctrls3</structfield>
represent the boolean controls */
} <structname>XkbCtrlsAction</structname>;
</programlisting></para>
@ -2880,16 +2883,15 @@ Actions associated with the
structure generate
<symbol>XkbActionMessage</symbol>
events:
</para>
<para><programlisting>
#define XkbActionMessageLength 6
</programlisting></para>
<para><programlisting>
<programlisting>
#define XkbActionMessageLength 6
typedef struct _XkbMessageAction {
unsigned char type; /* <symbol>XkbSA_ActionMessage</symbol> */
unsigned char flags; /* controls event generation via key presses and releases */
unsigned char message[XkbActionMessageLength]; /* message */
unsigned char type; /* <symbol>XkbSA_ActionMessage</symbol> */
unsigned char flags; /* controls event generation via
key presses and releases */
unsigned char message[XkbActionMessageLength]; /* message */
} <structname>XkbMessageAction</structname>;
</programlisting></para>
@ -3019,22 +3021,22 @@ The
The structure for the
<symbol>XkbActionMessage</symbol>
event is defined as follows:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbActionMessage {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbActionMessage</symbol> */
int device; /* Xkb device ID, will not be <symbol>XkbUseCoreKbd</symbol> */
KeyCode keycode; /* keycode of key triggering event */
Bool press; /* <symbol>True</symbol> &rArr; key press,
<symbol>False</symbol> &rArr; release */
Bool key_event_follows; /* <symbol>True</symbol> &rArr; KeyPress/KeyRelease follows */
char message[XkbActionMessageLength+1]; /* message text */
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbActionMessage</symbol> */
int device; /* Xkb device ID,
will not be <symbol>XkbUseCoreKbd</symbol> */
KeyCode keycode; /* keycode of key triggering event */
Bool press; /* <symbol>True</symbol> &rArr; key press,
<symbol>False</symbol> &rArr; release */
Bool key_event_follows;/* <symbol>True</symbol> &rArr; KeyPress/KeyRelease follows */
char message[XkbActionMessageLength+1]; /* message text */
} <structname>XkbActionMessageEvent</structname>;
</programlisting></para>
@ -3113,18 +3115,21 @@ Actions associated with the
<symbol>KeyRelease</symbol>
events containing a keycode different from the key that was pressed or
released:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbRedirectKeyAction {
unsigned char type; /* <symbol>XkbSA_RedirectKey</symbol> */
unsigned char new_key; /* keycode to be put in event */
unsigned char mods_mask; /* mask of real mods to be reset */
unsigned char mods; /* mask of real mods to take values from */
unsigned char vmods_mask0; /* first half of mask of virtual mods to be reset */
unsigned char vmods_mask1; /* other half of mask of virtual mods to be reset */
unsigned char vmods0; /* first half of mask of virtual mods to take values from */
unsigned char vmods1; /* other half of mask of virtual mods to take values from */
unsigned char type; /* <symbol>XkbSA_RedirectKey</symbol> */
unsigned char new_key; /* keycode to be put in event */
unsigned char mods_mask; /* mask of real mods to be reset */
unsigned char mods; /* mask of real mods to take values from */
unsigned char vmods_mask0; /* first half of mask of virtual mods
to be reset */
unsigned char vmods_mask1; /* other half of mask of virtual mods
to be reset */
unsigned char vmods0; /* first half of mask of virtual mods
to take values from */
unsigned char vmods1; /* other half of mask of virtual mods
to take values from */
} <structname>XkbRedirectKeyAction</structname>;
</programlisting></para>
@ -3378,15 +3383,15 @@ Actions associated with
and
<symbol>KeyRelease</symbol>
events:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbDeviceBtnAction {
unsigned char type; /* <symbol>XkbSA_DeviceBtn</symbol>, <symbol>XkbSA_LockDeviceBtn</symbol> */
unsigned char flags; /* with <structfield>type</structfield> , specifies locking or unlocking */
unsigned char count; /* controls number of DeviceButtonPress and Release events */
unsigned char button; /* index of button on <structfield>device</structfield> */
unsigned char device; /* device ID of an X input extension device */
unsigned char type; /* <symbol>XkbSA_DeviceBtn</symbol>, <symbol>XkbSA_LockDeviceBtn</symbol> */
unsigned char flags; /* with <structfield>type</structfield>, specifies locking or unlocking */
unsigned char count; /* controls number of DeviceButtonPress
and Release events */
unsigned char button; /* index of button on <structfield>device</structfield> */
unsigned char device; /* device ID of an X input extension device */
} <structname>XkbDeviceBtnAction</structname>;
</programlisting></para>
@ -3562,14 +3567,16 @@ valuators.
<para><programlisting>
typedef struct _XkbDeviceValuatorAction {
unsigned char type; /*<symbol>XkbSA_DeviceValuator</symbol> */
unsigned char device; /* device ID */
unsigned char v1_what; /* determines how valuator is to behave for valuator 1 */
unsigned char v1_ndx; /* specifies a real valuator */
unsigned char v1_value; /* the value for valuator 1 */
unsigned char v2_what; /* determines how valuator is to behave for valuator 2 */
unsigned char v2_ndx; /* specifies a real valuator */
unsigned char v2_value; /* the value for valuator 1 */
unsigned char type; /* <symbol>XkbSA_DeviceValuator</symbol> */
unsigned char device; /* device ID */
unsigned char v1_what; /* determines how valuator is
to behave for valuator 1 */
unsigned char v1_ndx; /* specifies a real valuator */
unsigned char v1_value; /* the value for valuator 1 */
unsigned char v2_what; /* determines how valuator is
to behave for valuator 2 */
unsigned char v2_ndx; /* specifies a real valuator */
unsigned char v2_value; /* the value for valuator 1 */
} <structname>XkbDeviceValuatorAction</structname>;
</programlisting></para>
@ -3680,12 +3687,11 @@ The following two masks are provided as a convenience to select either portion
of
<structfield>v1_what</structfield>
or
<structfield>v2_what</structfield>
:
<structfield>v2_what</structfield>:
<programlisting>
#define XkbSA_ValOpMask (0x70)
#define XkbSA_ValScaleMask (0x07)
#define XkbSA_ValOpMask (0x70)
#define XkbSA_ValScaleMask (0x07)
</programlisting>
</para>
@ -4000,9 +4006,8 @@ The low five bits of the
<structname>XkbBehavior</structname>
structure are the group number, the high three bits are flags. The only flag
currently defined is:
</para>
<para><programlisting>
<programlisting>
#define XkbKB_RGAllowNone 0x80
</programlisting></para>
@ -4018,13 +4023,12 @@ The
structures, indexed by keycode, and contains the behavior for each key. The
<structname>XkbBehavior</structname>
structure is defined as follows:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbBehavior {
unsigned char type; /* behavior type + optional
<symbol>XkbKB_Permanent</symbol> bit */
unsigned char data;
unsigned char type; /* behavior type + optional
<symbol>XkbKB_Permanent</symbol> bit */
unsigned char data;
} <structname>XkbBehavior</structname>;
</programlisting></para>

View file

@ -151,16 +151,15 @@ The
points to the
<structname>XkbCompatMapRec</structname>
structure:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbCompatMapRec {
XkbSymInterpretPtr sym_interpret; /* symbol based key semantics*/
XkbModsRec groups[XkbNumKbdGroups]; /* group &rArr; modifier map */
unsigned short num_si; /* # structures used in
<structfield>sym_interpret</structfield> */
unsigned short size_si; /* # structures allocated in
<structfield>sym_interpret</structfield> */
XkbSymInterpretPtr sym_interpret; /* symbol based key semantics */
XkbModsRec groups[XkbNumKbdGroups]; /* group &rArr; modifier map */
unsigned short num_si; /* # structures used in
<structfield>sym_interpret</structfield> */
unsigned short size_si; /* # structures allocated in
<structfield>sym_interpret</structfield> */
} <structname>XkbCompatMapRec</structname>, *XkbCompatMapPtr;
</programlisting></para>
@ -440,16 +439,16 @@ processing may be modified for the particular key involved:
<para>
The <structname>XkbSymInterpretRec</structname>
structure specifies a symbol interpretation:
</para>
<para><programlisting>
<programlisting>
typedef struct {
KeySym sym; /* keysym of interest or <symbol>NULL</symbol> */
unsigned char flags; /* <symbol>XkbSI_AutoRepeat</symbol>, <symbol>XkbSI_LockingKey</symbol> */
unsigned char match; /* specifies how mods is interpreted */
unsigned char mods; /* modifier bits, correspond to eight real modifiers */
unsigned char virtual_mod; /* 1 modifier to add to key virtual mod map */
XkbAnyAction act; /* action to bind to symbol position on key */
KeySym sym; /* keysym of interest or <symbol>NULL</symbol> */
unsigned char flags; /* <symbol>XkbSI_AutoRepeat</symbol>, <symbol>XkbSI_LockingKey</symbol> */
unsigned char match; /* specifies how mods is interpreted */
unsigned char mods; /* modifier bits, correspond to
eight real modifiers */
unsigned char virtual_mod; /* 1 modifier to add to key virtual mod map */
XkbAnyAction act; /* action to bind to symbol position on key */
} <structname>XkbSymInterpretRec</structname>,*XkbSymInterpretPtr;
</programlisting></para>
@ -649,14 +648,12 @@ for the key.
<para>
If the matching symbol is in position G1L1 of the key, two bits in the flags
field potentially specify additional behavior modifications:
</para>
<para><programlisting>
#define XkbSI_AutoRepeat (1&lt;&lt;0)
/* key repeats if sym is in position G1L1 */
#define XkbSI_LockingKey (1&lt;&lt;1)
/* set <emphasis>KB_Lock</emphasis>
behavior if sym is in psn G1L1 */
<programlisting>
#define XkbSI_AutoRepeat (1&lt;&lt;0) /* key repeats if sym
is in position G1L1 */
#define XkbSI_LockingKey (1&lt;&lt;1) /* set <emphasis>KB_Lock</emphasis> behavior
if sym is in psn G1L1 */
</programlisting></para>
<para>
@ -1575,26 +1572,25 @@ made by other clients.
The structure for the
<structname>XkbCompatMapNotifyEvent</structname>
is:
</para>
<para><programlisting>
<programlisting>
typedef struct {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr;
synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbCompatMapNotify</symbol> */
int device; /* Xkb device ID, will not be
<symbol>XkbUseCoreKbd</symbol> */
unsigned int changed_groups;/* number of group maps changed */
int first_si; /* index to 1st changed symbol
interpretation */
int num_si; /* number of changed symbol
interpretations */
int num_total_si; /* total number of valid symbol
interpretations */
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr;
synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbCompatMapNotify</symbol> */
int device; /* Xkb device ID, will not be
<symbol>XkbUseCoreKbd</symbol> */
unsigned int changed_groups; /* number of group maps changed */
int first_si; /* index to 1st changed symbol
interpretation */
int num_si; /* number of changed symbol
interpretations */
int num_total_si; /* total number of valid symbol
interpretations */
} <structname>XkbCompatMapNotifyEvent</structname>;
</programlisting></para>

View file

@ -33,50 +33,51 @@ these symbolic names are grouped into the
<para>
The names component of the keyboard description is defined as follows:
</para>
<para><programlisting>
<programlisting>
#define XkbKeyNameLength 4
#define XkbKeyNumVirtualMods 16
#define XkbKeyNumIndicators 32
#define XkbKeyNumKbdGroups 4
#define XkbMaxRadioGroups 32
</programlisting></para>
<para><programlisting>
typedef struct {
char name[XkbKeyNameLength]; /* symbolic key names */
} <structname>XkbKeyNameRec</structname>,*XkbKeyNamePtr;
</programlisting></para>
char name[XkbKeyNameLength]; /* symbolic key names */
} <structname>XkbKeyNameRec</structname>, *XkbKeyNamePtr;
<para><programlisting>
typedef struct {
char real[XkbKeyNameLength];
/* this key name must be in the keys array */
char alias[XkbKeyNameLength];
/* symbolic key name as alias for the key */
} <structname>XkbKeyAliasRec</structname>,*XkbKeyAliasPtr;
</programlisting></para>
char real[XkbKeyNameLength];
/* this key name must be in the keys array */
char alias[XkbKeyNameLength];
/* symbolic key name as alias for the key */
} <structname>XkbKeyAliasRec</structname>, *XkbKeyAliasPtr;
<para><programlisting>
typedef struct _XkbNamesRec {
Atom keycodes; /* identifies range and meaning of keycodes */
Atom geometry; /* identifies physical location, size, and shape of keys */
Atom symbols; /* identifies the symbols logically bound to the keys */
Atom types; /* identifies the set of key types */
Atom compat; /* identifies actions for keys using core protocol */
Atom vmods[XkbNumVirtualMods]; /* symbolic names for virtual modifiers */
Atom indicators[XkbNumIndicators]; /* symbolic names for indicators */
Atom groups[XkbNumKbdGroups]; /* symbolic names for keyboard groups */
XkbKeyNamePtr keys; /* symbolic key name array */
XkbKeyAliasPtr key_aliases; /* real/alias symbolic name pairs array */
Atom * radio_groups; /* radio group name array */
Atom phys_symbols; /* identifies the symbols engraved on the keyboard */
unsigned char num_keys; /* number of keys in the <structfield>keys</structfield> array */
unsigned char num_key_aliases; /* number of keys in the
<structfield>key_aliases</structfield> array */
unsigned short num_rg; /* number of radio groups */
} <structname>XkbNamesRec</structname>,*XkbNamesPtr; /*
Atom keycodes; /* identifies range and meaning
of keycodes */
Atom geometry; /* identifies physical location,
size, and shape of keys */
Atom symbols; /* identifies the symbols logically
bound to the keys */
Atom types; /* identifies the set of key types */
Atom compat; /* identifies actions for keys using
core protocol */
Atom vmods[XkbNumVirtualMods]; /* symbolic names for
virtual modifiers */
Atom indicators[XkbNumIndicators]; /* symbolic names
for indicators */
Atom groups[XkbNumKbdGroups]; /* symbolic names for
keyboard groups */
XkbKeyNamePtr keys; /* symbolic key name array */
XkbKeyAliasPtr key_aliases; /* real/alias symbolic name pairs array */
Atom * radio_groups; /* radio group name array */
Atom phys_symbols; /* identifies the symbols engraved
on the keyboard */
unsigned char num_keys; /* number of keys in the <structfield>keys</structfield> array */
unsigned char num_key_aliases; /* number of keys in the
<structfield>key_aliases</structfield> array */
unsigned short num_rg; /* number of radio groups */
} <structname>XkbNamesRec</structname>, *XkbNamesPtr;
</programlisting></para>
<para>
@ -640,34 +641,30 @@ The
<structname>XkbNameChangesRec</structname>
allows applications to identify small modifications to the symbolic names and
effectively reduces the amount of traffic sent to the server:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbNameChanges {
unsigned int changed; /* name components that have
changed */
unsigned char first_type; /* first key type with a new
name */
unsigned char num_types; /* number of types with new
names */
unsigned char first_lvl; /* first key type with new level
names */
unsigned char num_lvls; /* number of key types with new
level names */
unsigned char num_aliases; /* if key aliases changed,
total number of key aliases */
unsigned char num_rg; /* if radio groups changed, total
number of radio groups */
unsigned char first_key; /* first key with a new name */
unsigned char num_keys; /* number of keys with new names
*/
unsigned short changed_vmods; /* mask of virtual
modifiers for which names have changed */
unsigned long changed_indicators; /* mask of indicators
for which names were changed */
unsigned char changed_groups; /* mask of groups for
which names were changed */
} <structname>XkbNameChangesRec</structname>, *XkbNameChangesPtr
unsigned int changed; /* name components that have
changed */
unsigned char first_type; /* first key type with a new name */
unsigned char num_types; /* number of types with new names */
unsigned char first_lvl; /* first key type with new level
names */
unsigned char num_lvls; /* number of key types with new
level names */
unsigned char num_aliases; /* if key aliases changed,
total number of key aliases */
unsigned char num_rg; /* if radio groups changed, total
number of radio groups */
unsigned char first_key; /* first key with a new name */
unsigned char num_keys; /* number of keys with new names */
unsigned short changed_vmods; /* mask of virtual modifiers
for which names have changed */
unsigned long changed_indicators; /* mask of indicators
for which names were changed */
unsigned char changed_groups; /* mask of groups for
which names were changed */
} <structname>XkbNameChangesRec</structname>, *XkbNameChangesPtr;
</programlisting></para>
<para>
@ -871,39 +868,35 @@ and
The structure for the
<symbol>XkbNamesNotify</symbol>
event is defined as follows:
</para>
<para><programlisting>
<programlisting>
typedef struct {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for
event */
Bool send_event; /* <symbol>True</symbol>
&rArr; synthetically generated */
Display * display; /* server connection where event
generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbNamesNotify</symbol> */
int device; /* Xkb device ID, will not be
<symbol>XkbUseCoreKbd</symbol> */
unsigned int changed; /* mask of name components
that have changed */
int first_type; /* first key type with a new name */
int num_types; /* number of types with new names */
int first_lvl; /* first key type with new level names */
int num_lvls; /* number of key types with new level names */
int num_aliases; /* if key aliases changed, total number
of key aliases */
int num_radio_groups; /* if radio groups changed,
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbNamesNotify</symbol> */
int device; /* Xkb device ID, will not be
<symbol>XkbUseCoreKbd</symbol> */
unsigned int changed; /* mask of name components
that have changed */
int first_type; /* first key type with a new name */
int num_types; /* number of types with new names */
int first_lvl; /* first key type with new level names */
int num_lvls; /* number of key types with new level names */
int num_aliases; /* if key aliases changed, total number
of key aliases */
int num_radio_groups; /* if radio groups changed,
total number of radio groups */
unsigned int changed_vmods; /* mask of virtual modifiers for
which names have changed */
unsigned int changed_groups; /* mask of groups for
which names were changed */
unsigned int changed_indicators; /* mask of indicators for which
names were changed */
int first_key; /* first key with a new name */
int num_keys; /* number of keys with new names */
unsigned int changed_vmods; /* mask of virtual modifiers for
which names have changed */
unsigned int changed_groups; /* mask of groups for
which names were changed */
unsigned int changed_indicators; /* mask of indicators for which
names were changed */
int first_key; /* first key with a new name */
int num_keys; /* number of keys with new names */
} <structname>XkbNamesNotifyEvent</structname>;
</programlisting></para>

View file

@ -165,26 +165,24 @@ Xkb events are discarded, and no Xkb requests have their keycode range clamped.
The structure for the
<symbol>XkbNewKeyboardNotify</symbol>
event is defined as follows:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbNewKeyboardNotify {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event*/
Bool send_event; /* <symbol>True</symbol>
&rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbNewKeyboardNotify</symbol> */
int device; /* device ID of new keyboard */
int old_device; /* device ID of old keyboard */
int min_key_code; /* min keycode of new keyboard */
int max_key_code; /* max keycode of new keyboard */
int old_min_key_code; /* min keycode of old keyboard */
int old_max_key_code; /* max keycode of old keyboard */
unsigned int changed; /* changed aspects - see masks below */
char req_major; /* major request that caused change */
char req_minor; /* minor request that caused change */
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <symbol>XkbNewKeyboardNotify</symbol> */
int device; /* device ID of new keyboard */
int old_device; /* device ID of old keyboard */
int min_key_code; /* min keycode of new keyboard */
int max_key_code; /* max keycode of new keyboard */
int old_min_key_code; /* min keycode of old keyboard */
int old_max_key_code; /* max keycode of old keyboard */
unsigned int changed; /* changed aspects - see masks below */
char req_major; /* major request that caused change */
char req_minor; /* minor request that caused change */
} <structname>XkbNewKeyboardNotifyEvent</structname>;
</programlisting></para>

View file

@ -299,47 +299,42 @@ using standard
and
<function>free</function>
calls or their equivalent:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbComponentNames {
char * keymap; /* keymap names */
char * keycodes; /* keycode names */
char * types; /* type names */
char * compat; /* compatibility map names */
char * symbols; /* symbol names */
char * geometry; /* geometry names */
char * keymap; /* keymap names */
char * keycodes; /* keycode names */
char * types; /* type names */
char * compat; /* compatibility map names */
char * symbols; /* symbol names */
char * geometry; /* geometry names */
} <structname>XkbComponentNamesRec</structname>, *XkbComponentNamesPtr;
</programlisting></para>
<para>
<function>XkbListComponents</function>
returns a pointer to an
<structname>XkbComponentListRec</structname>
:
</para>
<structname>XkbComponentListRec</structname>:
<para><programlisting>
<programlisting>
typedef struct _XkbComponentList {
int num_keymaps; /* number of entries in keymap */
int num_keycodes; /* number of entries in keycodes */
int num_types; /* number of entries in types */
int num_compat; /* number of entries in compat */
int num_symbols; /* number of entries in symbols */
int num_geometry; /* number of entries in geometry;
XkbComponentNamePtr keymap; /* keymap names */
XkbComponentNamePtr keycodes; /* keycode names */
XkbComponentNamePtr types; /* type names */
XkbComponentNamePtr compat; /* compatibility map names */
XkbComponentNamePtr symbols; /* symbol names */
XkbComponentNamePtr geometry; /* geometry names */
int num_keymaps; /* number of entries in keymap */
int num_keycodes; /* number of entries in keycodes */
int num_types; /* number of entries in types */
int num_compat; /* number of entries in compat */
int num_symbols; /* number of entries in symbols */
int num_geometry; /* number of entries in geometry;
XkbComponentNamePtr keymap; /* keymap names */
XkbComponentNamePtr keycodes; /* keycode names */
XkbComponentNamePtr types; /* type names */
XkbComponentNamePtr compat; /* compatibility map names */
XkbComponentNamePtr symbols; /* symbol names */
XkbComponentNamePtr geometry; /* geometry names */
} <structname>XkbComponentListRec</structname>, *XkbComponentListPtr;
</programlisting></para>
<para><programlisting>
typedef struct _XkbComponentName {
unsigned short flags; /* hints regarding component name */
char * name; /* name of component */
unsigned short flags; /* hints regarding component name */
char * name; /* name of component */
} <structname>XkbComponentNameRec</structname>, *XkbComponentNamePtr;
</programlisting></para>

View file

@ -162,40 +162,36 @@ Information about X Input Extension devices is transferred between a client
program and the Xkb extension in an
<structname>XkbDeviceInfoRec</structname>
structure:
</para>
<para><programlisting>
<programlisting>
typedef struct {
char * name; /* name for device */
Atom type; /* name for class of devices */
unsigned short device_spec; /* device of interest */
Bool has_own_state; /* <symbol>True</symbol> &rArr;this
device has its own state */
unsigned short supported; /* bits indicating supported capabilities */
unsigned short unsupported; /* bits indicating unsupported capabilities */
unsigned short num_btns; /* number of entries in <structfield>btn_acts</structfield> */
XkbAction * btn_acts; /* button actions */
unsigned short sz_leds; /* total number of entries in LEDs vector */
unsigned short num_leds; /* number of valid entries in LEDs vector */
unsigned short dflt_kbd_fb; /* input extension ID of default (core kbd) indicator */
unsigned short dflt_led_fb; /* input extension ID of default indicator feedback */
XkbDeviceLedInfoPtr leds; /* LED descriptions */
char * name; /* name for device */
Atom type; /* name for class of devices */
unsigned short device_spec; /* device of interest */
Bool has_own_state; /* <symbol>True</symbol> &rArr; this device has
its own state */
unsigned short supported; /* bits indicating supported capabilities */
unsigned short unsupported; /* bits indicating unsupported capabilities */
unsigned short num_btns; /* number of entries in <structfield>btn_acts</structfield> */
XkbAction * btn_acts; /* button actions */
unsigned short sz_leds; /* total number of entries in LEDs vector */
unsigned short num_leds; /* number of valid entries in LEDs vector */
unsigned short dflt_kbd_fb; /* input extension ID of default
(core kbd) indicator */
unsigned short dflt_led_fb; /* input extension ID of default
indicator feedback */
XkbDeviceLedInfoPtr leds; /* LED descriptions */
} <structname>XkbDeviceInfoRec</structname>, *XkbDeviceInfoPtr;
</programlisting></para>
<para><programlisting>
typedef struct {
unsigned short led_class; /* class for this LED device*/
unsigned short led_id; /* ID for this LED device */
unsigned int phys_indicators; /* bits for which LEDs physically
present */
unsigned int maps_present; /* bits for which LEDs have maps in
<structfield>maps</structfield> */
unsigned int names_present; /* bits for which LEDs are in
<structfield>names</structfield> */
unsigned int state; /* 1 bit &rArr; corresponding LED is on */
Atom names[XkbNumIndicators]; /* names for LEDs */
XkbIndicatorMapRec maps; /* indicator maps for each LED */
unsigned short led_class; /* class for this LED device */
unsigned short led_id; /* ID for this LED device */
unsigned int phys_indicators; /* bits for which LEDs physically present */
unsigned int maps_present; /* bits for which LEDs have maps in <structfield>maps</structfield> */
unsigned int names_present; /* bits for which LEDs are in <structfield>names</structfield> */
unsigned int state; /* 1 bit &rArr; corresponding LED is on */
Atom names[XkbNumIndicators]; /* names for LEDs */
XkbIndicatorMapRec maps; /* indicator maps for each LED */
} <structname>XkbDeviceLedInfoRec</structname>, *XkbDeviceLedInfoPtr;
</programlisting></para>
@ -1759,29 +1755,26 @@ The
The structure for
<symbol>XkbExtensionDeviceNotify</symbol>
events is:
</para>
<para><programlisting>
<programlisting>
typedef struct {
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol>
&rArr; synthetically generated*/
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <structname>XkbExtensionDeviceNotifyEvent</structname> */
int device; /* Xkb device ID, will not be
<symbol>XkbUseCoreKbd</symbol> */
unsigned int reason; /* reason for the event */
unsigned int supported; /* mask of supported features */
unsigned int unsupported; /* unsupported features this client
int type; /* Xkb extension base event code */
unsigned long serial; /* X server serial number for event */
Bool send_event; /* <symbol>True</symbol> &rArr; synthetically generated */
Display * display; /* server connection where event generated */
Time time; /* server time when event generated */
int xkb_type; /* <structname>XkbExtensionDeviceNotifyEvent</structname> */
int device; /* Xkb device ID, will not be <symbol>XkbUseCoreKbd</symbol> */
unsigned int reason; /* reason for the event */
unsigned int supported; /* mask of supported features */
unsigned int unsupported; /* unsupported features this client
attempted to use */
int first_btn; /* first button that changed */
int num_btns; /* number of buttons that changed */
unsigned int leds_defined; /* indicators with names or maps */
unsigned int led_state; /* current state of the indicators */
int led_class; /* feedback class for LED changes */
int led_id; /* feedback ID for LED changes */
int first_btn; /* first button that changed */
int num_btns; /* number of buttons that changed */
unsigned int leds_defined; /* indicators with names or maps */
unsigned int led_state; /* current state of the indicators */
int led_class; /* feedback class for LED changes */
int led_id; /* feedback ID for LED changes */
} <structname>XkbExtensionDeviceNotifyEvent</structname>;
</programlisting></para>
@ -1807,27 +1800,24 @@ Changes to an Xkb extension device may be tracked by listening to
structure. The changes noted in the structure may then be used in subsequent
operations to update either a server configuration or a local copy of an Xkb
extension device configuration. The changes structure is defined as follows:
</para>
<para><programlisting>
<programlisting>
typedef struct _XkbDeviceChanges {
unsigned int changed; /* bits indicating what has changed */
unsigned short first_btn; /* number of first button which changed,
if any */
unsigned short num_btns; /* number of buttons that have changed */
XkbDeviceLedChangesRec leds;
} <structname>XkbDeviceChangesRec</structname>,*XkbDeviceChangesPtr;
</programlisting></para>
unsigned int changed; /* bits indicating what has changed */
unsigned short first_btn; /* number of first button which changed,
if any */
unsigned short num_btns; /* number of buttons that have changed */
XkbDeviceLedChangesRec leds;
} <structname>XkbDeviceChangesRec</structname>, *XkbDeviceChangesPtr;
<para><programlisting>
typedef struct _XkbDeviceLedChanges {
unsigned short led_class; /* class of this indicator feedback bundle */
unsigned short led_id; /* ID of this indicator feedback bundle */
unsigned int names; /* bits indicating which names have changed */
unsigned int maps; /* bits indicating which maps have changed */
struct _XkbDeviceLedChanges *next; /* link to indicator change record
for next set */
} <structname>XkbDeviceLedChangesRec</structname>,*XkbDeviceLedChangesPtr;
unsigned short led_class; /* class of this indicator feedback bundle */
unsigned short led_id; /* ID of this indicator feedback bundle */
unsigned int names; /* bits indicating which names have changed */
unsigned int maps; /* bits indicating which maps have changed */
struct _XkbDeviceLedChanges *next; /* link to indicator change record
for next set */
} <structname>XkbDeviceLedChangesRec</structname>, *XkbDeviceLedChangesPtr;
</programlisting></para>
<para>