<s>
In	O
human	O
–	O
computer	O
interfaces	O
,	O
the	O
X	B-Application
keyboard	I-Application
extension	I-Application
or	O
XKB	B-Application
is	O
a	O
part	O
of	O
the	O
X	B-Operating_System
Window	I-Operating_System
System	I-Operating_System
that	O
extends	O
the	O
ability	O
to	O
control	O
the	O
keyboard	B-Device
over	O
what	O
is	O
offered	O
by	O
the	O
X	B-Device
Window	I-Device
System	I-Device
core	I-Device
protocol	I-Device
,	O
and	O
allows	O
to	O
use	O
multiple	O
keyboard	B-Device
layouts	O
.	O
</s>
<s>
better	O
treatment	O
of	O
key	O
groups	O
(	O
typically	O
keyboard	B-Device
layouts	O
)	O
;	O
</s>
<s>
extended	O
control	O
of	O
keyboard	B-Device
indicators	O
(	O
LEDs	O
)	O
and	O
bells	O
;	O
</s>
<s>
various	O
new	O
keyboard	B-Device
parameters	O
(	O
controls	O
)	O
;	O
</s>
<s>
XKB	B-Application
is	O
composed	O
of	O
two	O
parts	O
:	O
a	O
server	O
extension	O
and	O
a	O
client	O
library	O
.	O
</s>
<s>
Modern	O
versions	O
of	O
Xlib	B-Language
contain	O
XKB	B-Application
,	O
which	O
is	O
active	O
by	O
default	O
.	O
</s>
<s>
XKB	B-Application
is	O
also	O
used	O
by	O
Wayland	O
compositors	O
and	O
kmscon	B-Application
.	O
</s>
<s>
XKB	B-Application
allows	O
a	O
modifier	B-Device
to	O
be	O
locked	O
or	O
latched	O
,	O
other	O
than	O
being	O
in	O
its	O
regular	O
state	O
.	O
</s>
<s>
Normally	O
,	O
a	O
modifier	B-Device
is	O
active	O
exactly	O
when	O
it	O
is	O
pressed	O
,	O
like	O
the	O
Shift	B-Device
.	O
</s>
<s>
However	O
,	O
a	O
modifier	B-Device
may	O
also	O
be	O
locked	O
,	O
like	O
the	O
Caps	B-Device
Lock	I-Device
modifier	B-Device
.	O
</s>
<s>
When	O
a	O
modifier	B-Device
is	O
locked	O
,	O
it	O
remains	O
active	O
until	O
it	O
is	O
explicitly	O
deactivated	O
.	O
</s>
<s>
An	O
intermediate	O
condition	O
between	O
regular	O
and	O
locked	O
is	O
the	O
latched	O
state	O
:	O
When	O
a	O
modifier	B-Device
is	O
latched	O
,	O
it	O
remains	O
active	O
,	O
but	O
only	O
until	O
the	O
next	O
non-modifier	O
key	O
is	O
pressed	O
.	O
</s>
<s>
XKB	B-Application
allows	O
a	O
client	O
application	O
to	O
explicitly	O
latch	O
or	O
lock	O
a	O
modifier	B-Device
.	O
</s>
<s>
Moreover	O
,	O
an	O
application	O
can	O
bind	O
a	O
key	O
press	O
or	O
release	O
to	O
a	O
modifier	B-Device
state	O
change	O
.	O
</s>
<s>
This	O
way	O
,	O
a	O
modifier	B-Device
may	O
automatically	O
become	O
latched	O
or	O
locked	O
whenever	O
a	O
key	O
is	O
pressed	O
or	O
released	O
.	O
</s>
<s>
XKB	B-Application
allows	O
for	O
the	O
keyboard	B-Device
to	O
switch	O
between	O
any	O
of	O
four	O
different	O
character	O
groups	O
.	O
</s>
<s>
This	O
is	O
usually	O
done	O
for	O
making	O
a	O
keyboard	B-Device
behave	O
like	O
a	O
keyboard	B-Device
of	O
a	O
different	O
language	O
.	O
</s>
<s>
In	O
this	O
context	O
,	O
the	O
set	O
of	O
characters	O
that	O
is	O
generated	O
by	O
the	O
keyboard	B-Device
is	O
called	O
a	O
group	O
,	O
and	O
a	O
keyboard	B-Device
can	O
switch	O
to	O
a	O
different	O
group	O
at	O
any	O
time	O
.	O
</s>
<s>
XKB	B-Application
defines	O
some	O
group	O
selectors	O
(	O
which	O
are	O
simply	O
called	O
groups	O
in	O
the	O
specification	O
)	O
.	O
</s>
<s>
The	O
behavior	O
of	O
the	O
keyboard	B-Device
depends	O
on	O
a	O
number	O
of	O
parameters	O
that	O
can	O
be	O
changed	O
by	O
the	O
clients	O
.	O
</s>
<s>
XKB	B-Application
allows	O
for	O
associating	O
actions	O
with	O
key	O
presses	O
,	O
which	O
moves	O
some	O
of	O
the	O
burden	O
of	O
input	O
event	O
processing	O
from	O
client	O
applications	O
to	O
the	O
X	B-Operating_System
server	O
.	O
</s>
<s>
Moreover	O
,	O
there	O
are	O
some	O
actions	O
related	O
to	O
devices	O
that	O
are	O
available	O
if	O
the	O
server	O
supports	O
the	O
X	B-Operating_System
Input	O
extension	O
.	O
</s>
<s>
The	O
X	B-Application
keyboard	I-Application
extension	I-Application
is	O
incompatible	O
with	O
core	O
keyboard	B-Device
handling	O
and	O
as	O
a	O
result	O
several	O
modifier	B-Device
keys	I-Device
are	O
not	O
working	O
or	O
require	O
workarounds	O
inside	O
emulated	O
environments	O
such	O
as	O
VNC	O
or	O
Xephyr	B-Device
.	O
</s>
<s>
XKB	B-Application
allows	O
better	O
handling	O
of	O
the	O
keyboard	B-Device
indicators	O
(	O
LEDs	O
)	O
.	O
</s>
<s>
In	O
particular	O
,	O
XKB	B-Application
provides	O
symbolic	O
names	O
for	O
indicators	O
,	O
which	O
allows	O
binding	O
indicators	O
to	O
keyboard	B-Device
activity	O
and	O
checking	O
which	O
indicators	O
are	O
actually	O
present	O
on	O
the	O
keyboard	B-Device
.	O
</s>
<s>
XKB	B-Application
also	O
improves	O
upon	O
the	O
core	B-Device
protocol	I-Device
's	I-Device
handling	O
of	O
bells	O
;	O
the	O
core	O
protocol	O
only	O
supports	O
one	O
bell	O
,	O
and	O
the	O
only	O
action	O
a	O
client	O
can	O
perform	O
is	O
to	O
ring	O
the	O
bell	O
.	O
</s>
<s>
XKB	B-Application
supports	O
multiple	O
named	O
bells	O
and	O
allows	O
a	O
client	O
to	O
deactivate	O
some	O
of	O
them	O
and	O
to	O
be	O
informed	O
when	O
a	O
bell	O
is	O
rung	O
.	O
</s>
<s>
XKB	B-Application
allows	O
a	O
client	O
to	O
query	O
the	O
physical	O
shape	O
of	O
the	O
keyboard	B-Device
,	O
including	O
the	O
shapes	O
of	O
individual	O
keys	O
.	O
</s>
<s>
Keys	O
and	O
sections	O
have	O
a	O
geometry	O
,	O
which	O
comprise	O
the	O
approximate	O
outline	O
of	O
the	O
key	O
,	O
its	O
bounding	B-Algorithm
box	I-Algorithm
,	O
and	O
the	O
precise	O
form	O
.	O
</s>
<s>
Other	O
than	O
keys	O
,	O
the	O
geometry	O
also	O
includes	O
doodads	O
,	O
which	O
are	O
elements	O
on	O
the	O
keyboard	B-Device
that	O
are	O
not	O
keys	O
.	O
</s>
<s>
The	O
overall	O
shape	O
of	O
the	O
keyboard	B-Device
is	O
a	O
doodad	O
.	O
</s>
