# phpman > man > keyboard(5)

[KEYBOARD(5)](https://www.chedong.com/phpMan.php/man/KEYBOARD/5/markdown)                          Console-setup User's Manual                         [KEYBOARD(5)](https://www.chedong.com/phpMan.php/man/KEYBOARD/5/markdown)



## NAME
       keyboard - keyboard configuration file

## DESCRIPTION
       The  **keyboard** file describes the properties of the keyboard. It is read by [**setupcon**(1)](https://www.chedong.com/phpMan.php/man/setupcon/1/markdown) in or‐
       der to configure the keyboard on the console.  In Debian systems the default keyboard  layout
       is described in _/etc/default/keyboard_ and it is shared between X and the console.

       The  specification  of  the  keyboard layout in the **keyboard** file is based on the XKB 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 _xorg.lst_.

       You might want to read “The XKB Configuration Guide” by Kamil Toman and Ivan U. Pascal:

              <http://www.xfree86.org/current/XKB-Config.html>

       Other possible readings are:

              <https://wiki.archlinux.org/index.php/X_KeyBoard_extension>
              <http://pascal.tsu.ru/en/xkb/>
              <http://www.charvolant.org/~doug/xkb/>

       The complete XKB-specification can be found on

              <http://xfree86.org/current/XKBproto.pdf>

       The file **keyboard** consists of variable settings in POSIX format:

              _VARIABLE_=_VALUE_

       Only one assignment is allowed per line.  Comments (starting with '#') are also allowed.


## OPTIONS
       The following variables can be set.


       **XKBMODEL**
              Specifies the XKB keyboard model name.  Default: **pc105** on most platforms.


       **XKBLAYOUT**
              Specifies the XKB keyboard layout name. This is usually the country or  language  type
              of the keyboard. Default: **us** on most platforms


       **XKBVARIANT**
              Specifies  the  XKB  keyboard variant components. These can be used to further specify
              the keyboard layout details. Default: not set.


       **XKBOPTIONS**
              Specifies the XKB keyboard option components.  Options usually relate to the  behavior
              of the special keys (<Shift>, <Control>, <Alt>, <CapsLock>, etc.)  Default: not set.


       **BACKSPACE**
              Determines the behavior of <BackSpace> and <Delete> keys on the console.  Allowed val‐
              ues: **bs**, **del** and **guess**.  In most cases you can specify **guess** here, in which  case  the
              current  terminal settings and the kernel of your operating system will be used to de‐
              termine the correct value.  Value **bs** specifies VT100-conformant behavior:  <BackSpace>
              will  generate  **^H**  (ASCII  BS) and <Delete> will generate **^?**  (ASCII DEL).  Value **del**
              specifies VT220-conformant behavior: <BackSpace> will generate  **^?**   (ASCII  DEL)  and
              <Delete> will generate a special function sequence.


       **KMAP**   Usually  this  variable will be unset but if you don't want to use a XKB layout on the
              console, you can specify an alternative keymap here.  Specify a file that is  suitable
              as input for [**loadkeys**(1)](https://www.chedong.com/phpMan.php/man/loadkeys/1/markdown) on Linux or for [**kbdcontrol**(1)](https://www.chedong.com/phpMan.php/man/kbdcontrol/1/markdown) on FreeBSD.


## FILES
       The  standard  location  of  the  **keyboard** file is _/etc/default/keyboard_.  Description of all
       available   keyboard   models,   layouts,   variants   and   options    is    available    in
       _/usr/share/X11/xkb/rules/xorg.lst_.     In    most    cases,    in    _/usr/share/keymaps/_   or
       _/usr/share/syscons/keymaps/_ you will find several keymaps that can be used with the  variable
       **KMAP**.


## NOTES
       In  Debian  systems, changes in _/etc/default/keyboard_ do not become immediately visible to X.
       You should either reboot the system, or use

           udevadm trigger --subsystem-match=input --action=change

       In order to activate the changes on the console, run [**setupcon**(1)](https://www.chedong.com/phpMan.php/man/setupcon/1/markdown)**.**


## BUGS
       When a triple-layout is used on the console, i.e. a layout with three XKB  groups,  then  the
       group toggling happens in the following way: Group1 -> Group2 -> Group1 -> Group3.

       On FreeBSD triple- and quadruple-layouts are not supported on the console (only the first and
       the second layout are taken into account).

       The option **grp:shifts**___**toggle** is not supported on the console.


## EXAMPLES
       The following configuration will give you the standard US QWERTY layout (**us**).  The key <Menu>
       will  act  as  a  compose  key  (**compose:menu**)  and  <CapsLock> will act as third control key
       (**ctrl:nocaps**).

           XKBLAYOUT=us
           XKBVARIANT=
           XKBOPTIONS=compose:menu,ctrl:nocaps

       In the following configuration the right <Alt> key (**grp:toggle**) will toggle between US QWERTY
       layout  (**us**)  and Greek (**gr**) layout.  The option **grp**___**led:scroll** 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).

           XKBLAYOUT=us,gr
           XKBVARIANT=
           XKBOPTIONS=grp:toggle,grp_led:scroll

       In   the   following   configuration   the  <Control>+<Shift>  key  combination  will  toggle
       (**grp:ctrl**___**shift**___**toggle**) between French keyboard  (**fr**)  without  dead  keys  (**nodeadkeys**)  and
       British  (**gb**)  “Dvorak”  (**dvorak**)  keyboard.  The right <Win> key will be a compose-key (**com**‐‐
       **pose:rwin**) and the right <Alt> key will function as AltGr (**lv3:lalt**___**switch**).

           XKBLAYOUT=fr,gb
           XKBVARIANT=nodeadkeys,dvorak
           XKBOPTIONS=grp:ctrl_shift_toggle,compose:rwin,lv3:ralt_switch


## SEE ALSO
       [**setupcon**(1)](https://www.chedong.com/phpMan.php/man/setupcon/1/markdown), [**ckbcomp**(1)](https://www.chedong.com/phpMan.php/man/ckbcomp/1/markdown), [**console-setup**(5)](https://www.chedong.com/phpMan.php/man/console-setup/5/markdown), [**loadkeys**(1)](https://www.chedong.com/phpMan.php/man/loadkeys/1/markdown), [**kbdcontrol**(1)](https://www.chedong.com/phpMan.php/man/kbdcontrol/1/markdown)



console-setup                                2011-03-17                                  [KEYBOARD(5)](https://www.chedong.com/phpMan.php/man/KEYBOARD/5/markdown)
