# man > kbd_mode(1)

[KBD_MODE(1)](https://www.chedong.com/phpMan.php/man/KBDMODE/1/markdown)                            General Commands Manual                           [KBD_MODE(1)](https://www.chedong.com/phpMan.php/man/KBDMODE/1/markdown)



## NAME
       kbd_mode - report or set the keyboard mode

## SYNOPSIS
       **kbd**___**mode** [ _-a_ _|_ _-u_ _|_ _-k_ _|_ _-s_ ] [ _-f_ ] [ _-C_ _CONSOLE_ ]

## DESCRIPTION
       Without  argument, **kbd**___**mode** prints the current keyboard mode (RAW, MEDIUMRAW or XLATE).  With
       argument, it sets the keyboard mode as indicated:

       -s: scancode mode (RAW),

       -k: keycode mode (MEDIUMRAW),

       -a: ASCII mode (XLATE),

       -u: UTF-8 mode (UNICODE).

       Of course the "-a" is only traditional, and the code used can be  any  8-bit  character  set.
       With  "-u"  a 16-bit character set is expected, and these chars are transmitted to the kernel
       as 1, 2, or 3 bytes (following the UTF-8 coding).  In these latter two modes the key  mapping
       defined by [**loadkeys**(1)](https://www.chedong.com/phpMan.php/man/loadkeys/1/markdown) is used.

       kbd_mode  operates on the console specified by the "-C" option; if there is none, the console
       associated with stdin is used.

       Warning: changing the keyboard mode, other than between ASCII and Unicode, will probably make
       your  keyboard  unusable.  Set  the  "-f" option to force such changes.  This command is only
       meant for use (say via remote login) when some program left your keyboard in the wrong state.
       Note  that  in  some obsolete versions of this program the "-u" option was a synonym for "-s"
       and older versions of this program may not recognize the "-f" option.

## SEE ALSO
       [**loadkeys**(1)](https://www.chedong.com/phpMan.php/man/loadkeys/1/markdown)




kbd                                          6 Apr 1994                                  [KBD_MODE(1)](https://www.chedong.com/phpMan.php/man/KBDMODE/1/markdown)
