man-pages/man5/keyboard.5.html
2021-03-31 01:06:50 +01:00

399 lines
8.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of KEYBOARD</TITLE>
</HEAD><BODY>
<H1>KEYBOARD</H1>
Section: Console-setup User's Manual (5)<BR>Updated: 2011-03-17<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
keyboard - keyboard configuration file
<A NAME="lbAC">&nbsp;</A>
<H2>DESCRIPTION</H2>
The
<B>keyboard</B>
file describes the properties of the keyboard. It is read by
<B><A HREF="/cgi-bin/man/man2html?1+setupcon">setupcon</A></B>(1)
in order to configure the keyboard on the console. In Debian systems
the default keyboard layout is described in
<I>/etc/default/keyboard</I>
and it is shared between X and the console.
<P>
The specification of the keyboard layout in the
<B>keyboard</B>
file is based on the
<FONT SIZE="-1">XKB</FONT>
options XkbModel, XkbLayout, XkbVariant and XkbOptions.
Unfortunately, there is little documentation how to use them. Description of all possible values for these options can be found in the file
<I>xorg.lst</I>.
<P>
You might want to read ``The XKB Configuration Guide'' by Kamil
Toman and Ivan U. Pascal:
<DL COMPACT>
<DT id="1"><DD>
<A HREF="http://www.xfree86.org/current/XKB-Config.html">http://www.xfree86.org/current/XKB-Config.html</A>
</DL>
<P>
Other possible readings are:
<DL COMPACT>
<DT id="2"><DD>
<A HREF="https://wiki.archlinux.org/index.php/X_KeyBoard_extension">https://wiki.archlinux.org/index.php/X_KeyBoard_extension</A>
<BR>
<A HREF="http://pascal.tsu.ru/en/xkb/">http://pascal.tsu.ru/en/xkb/</A>
<BR>
<A HREF="http://www.charvolant.org/~doug/xkb/">http://www.charvolant.org/~doug/xkb/</A>
</DL>
<P>
The complete XKB-specification can be found on
<DL COMPACT>
<DT id="3"><DD>
<A HREF="http://xfree86.org/current/XKBproto.pdf">http://xfree86.org/current/XKBproto.pdf</A>
</DL>
<P>
The file
<B>keyboard</B>
consists of variable settings in
<FONT SIZE="-1">POSIX</FONT>
format:
<DL COMPACT>
<DT id="4"><DD>
<I>VARIABLE</I>=<I>VALUE</I>
</DL>
<P>
Only one assignment is allowed per line. Comments (starting with '#')
are also allowed.
<P>
<A NAME="lbAD">&nbsp;</A>
<H2>OPTIONS</H2>
The following variables can be set.
<P>
<DL COMPACT>
<DT id="5"><B>XKBMODEL</B>
<DD>
Specifies the
<FONT SIZE="-1">XKB</FONT>
keyboard model name. Default:
<B>pc105</B>
on most platforms.
<P>
<DT id="6"><B>XKBLAYOUT</B>
<DD>
Specifies the
<FONT SIZE="-1">XKB</FONT>
keyboard layout name. This is usually the country or language type of
the keyboard. Default:
<B>us</B>
on most platforms
<P>
<DT id="7"><B>XKBVARIANT</B>
<DD>
Specifies the
<FONT SIZE="-1">XKB</FONT>
keyboard variant components. These can be used to further specify the
keyboard layout details. Default: not set.
<P>
<DT id="8"><B>XKBOPTIONS</B>
<DD>
Specifies the
<FONT SIZE="-1">XKB</FONT>
keyboard option components. Options usually relate to the behavior
of the special keys
<FONT SIZE="-1">(&lt;Shift&gt;, &lt;Control&gt;, &lt;Alt&gt;, &lt;CapsLock&gt;, etc.)</FONT>
Default: not set.
<P>
<DT id="9"><B>BACKSPACE</B>
<DD>
Determines the behavior of
<FONT SIZE="-1">&lt;BackSpace&gt;</FONT>
and
<FONT SIZE="-1">&lt;Delete&gt;</FONT>
keys on the console. Allowed values:
<B>bs,</B> del <B>and</B> guess.
In most cases you can specify
<B>guess</B>
here, in which case the current terminal settings and the kernel of
your operating system will be used to determine the correct value.
Value
<B>bs</B>
specifies VT100-conformant behavior:
<FONT SIZE="-1">&lt;BackSpace&gt;</FONT>
will generate
<B>^H</B>
<FONT SIZE="-1">(ASCII BS)</FONT>
and
<FONT SIZE="-1">&lt;Delete&gt;</FONT>
will generate
<B>^?</B>
<FONT SIZE="-1">(ASCII DEL).</FONT>
Value
<B>del</B>
specifies VT220-conformant behavior:
<FONT SIZE="-1">&lt;BackSpace&gt;</FONT>
will generate
<B>^?</B>
<FONT SIZE="-1">(ASCII DEL)</FONT>
and
<FONT SIZE="-1">&lt;Delete&gt;</FONT>
will generate a special function sequence.
<P>
<DT id="10"><B>KMAP</B>
<DD>
Usually this variable will be unset but if you don't want to use a
<FONT SIZE="-1">XKB</FONT>
layout on the console, you can specify an alternative keymap here.
Specify a file that is suitable as input for
<B><A HREF="/cgi-bin/man/man2html?1+loadkeys">loadkeys</A></B>(1)
on Linux or for
<B><A HREF="/cgi-bin/man/man2html?1+kbdcontrol">kbdcontrol</A></B>(1)
on FreeBSD.
<P>
</DL>
<A NAME="lbAE">&nbsp;</A>
<H2>FILES</H2>
The standard location of the
<B>keyboard</B>
file is
<I>/etc/default/keyboard</I>.
Description of all available keyboard models, layouts, variants and
options is available in
<I>/usr/share/X11/xkb/rules/xorg.lst</I>.
In most cases, in
<I>/usr/share/keymaps/</I> or <I>/usr/share/syscons/keymaps/</I>
you will find several keymaps that can be used with the variable
<B>KMAP</B>.
<P>
<A NAME="lbAF">&nbsp;</A>
<H2>NOTES</H2>
In Debian systems, changes in
<I>/etc/default/keyboard</I>
do not become immediately visible to X. You should either reboot the
system, or use
<PRE>
udevadm trigger --subsystem-match=input --action=change
</PRE>
In order to activate the changes on the console, run
<B><A HREF="/cgi-bin/man/man2html?1+setupcon">setupcon</A></B>(1)<B>.</B>
<P>
<A NAME="lbAG">&nbsp;</A>
<H2>BUGS</H2>
When a triple-layout is used on the console, i.e. a layout with three
<FONT SIZE="-1">XKB</FONT>
groups, then the group toggling happens in the following way: Group1
-&gt; Group2 -&gt; Group1 -&gt; Group3.
<P>
On FreeBSD triple- and quadruple-layouts are not supported on the
console (only the first and the second layout are taken into account).
<P>
The option
<B>grp:shifts_toggle</B>
is not supported on the console.
<P>
<A NAME="lbAH">&nbsp;</A>
<H2>EXAMPLES</H2>
<P>
The following configuration will give you the standard
<FONT SIZE="-1">US QWERTY</FONT>
layout
(<B>us</B>).
The key
<FONT SIZE="-1">&lt;Menu&gt;</FONT>
will act as a compose key
(<B>compose:menu</B>)
and
<FONT SIZE="-1">&lt;CapsLock&gt;</FONT>
will act as third control key
(<B>ctrl:nocaps</B>).
<PRE>
XKBLAYOUT=us
XKBVARIANT=
XKBOPTIONS=compose:menu,ctrl:nocaps
</PRE>
In the following configuration the right
<FONT SIZE="-1">&lt;Alt&gt;</FONT>
key
(<B>grp:toggle</B>)
will toggle between
<FONT SIZE="-1">US QWERTY</FONT>
layout
(<B>us</B>)
and Greek
(<B>gr</B>)
layout. The option
<B>grp_led:scroll</B>
is ignored on the console but in X in means to use the ScrollLock
keyboard led as indicator for the current layout (US or Greek).
<PRE>
XKBLAYOUT=us,gr
XKBVARIANT=
XKBOPTIONS=grp:toggle,grp_led:scroll
</PRE>
In the following configuration the
<FONT SIZE="-1">&lt;Control&gt;+&lt;Shift&gt;</FONT>
key combination will toggle
(<B>grp:ctrl_shift_toggle</B>)
between French keyboard
(<B>fr</B>)
without dead keys
(<B>nodeadkeys</B>)
and British
(<B>gb</B>)
``Dvorak''
(<B>dvorak</B>)
keyboard. The right
<FONT SIZE="-1">&lt;Win&gt;</FONT>
key will be a compose-key
(<B>compose:rwin</B>)
and the right
<FONT SIZE="-1">&lt;Alt&gt;</FONT>
key will function as AltGr
(<B>lv3:lalt_switch</B>).
<PRE>
XKBLAYOUT=fr,gb
XKBVARIANT=nodeadkeys,dvorak
XKBOPTIONS=grp:ctrl_shift_toggle,compose:rwin,lv3:ralt_switch
</PRE>
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+setupcon">setupcon</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+ckbcomp">ckbcomp</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?5+console-setup">console-setup</A></B>(5),
<B><A HREF="/cgi-bin/man/man2html?1+loadkeys">loadkeys</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+kbdcontrol">kbdcontrol</A></B>(1)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="11"><A HREF="#lbAB">NAME</A><DD>
<DT id="12"><A HREF="#lbAC">DESCRIPTION</A><DD>
<DT id="13"><A HREF="#lbAD">OPTIONS</A><DD>
<DT id="14"><A HREF="#lbAE">FILES</A><DD>
<DT id="15"><A HREF="#lbAF">NOTES</A><DD>
<DT id="16"><A HREF="#lbAG">BUGS</A><DD>
<DT id="17"><A HREF="#lbAH">EXAMPLES</A><DD>
<DT id="18"><A HREF="#lbAI">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:03 GMT, March 31, 2021
</BODY>
</HTML>