|
Size: 2961
Comment: Add link to french translation
|
Size: 4029
Comment: formatting, cleanup, new info (config, switch layouts)
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 9: | Line 9: |
| The keyboard settings are stored in '''/etc/default/keyboard'''. This file provided by '''keyboard-configuration''' package and other packages use this information in order to configure the keyboard on the console or in X Window. | == Keyboard configuration == The keyboard settings are stored in '''{{{/etc/default/keyboard}}}''' file. It's provided by DebPkg:keyboard-configuration package (it's a part of the DebPkg:console-setup source package), and other packages use this information in order to configure the keyboard on the console or in X Window System. |
| Line 12: | Line 14: |
| Line 14: | Line 15: |
| $ sudo dpkg-reconfigure keyboard-configuration | # dpkg-reconfigure keyboard-configuration |
| Line 17: | Line 18: |
| As usual it will prompt you for the ''model'' of keyboard (what the keyboard *is*), and then for the keyboard ''layout'' (what the keys should *do*). Use this tool to change your keyboard map e.g from qwerty to qwertz, or to dworak, or for non-English layouts. | As usual, it will prompt you for the ''model'' of keyboard (what the keyboard ''*is*''), and then for the keyboard ''layout'' (what the keys should ''*do*''). Use this tool to change your keyboard map, e. g. from ''QWERTY'' to ''QWERTZ'' or to ''Dvorak'', or for non-English layouts. |
| Line 19: | Line 20: |
| * Keyboard layout (keymap), see [[http://www.debian.org/doc/manuals/debian-reference/ch08.en.html#_the_keyboard_input|debian-reference]]. | You can also edit {{{/etc/default/keyboard}}} manually, here's an example: {{{ # KEYBOARD CONFIGURATION FILE |
| Line 21: | Line 24: |
| * "{{{dpkg-reconfigure --priority=low xserver-xorg}}}" suggested by the above linked page does not work in Squeeze. You may try to add something like "{{{setxkbmap us,ru -option grp:ctrl_shift_toggle}}}" into {{{~/.xsessionrc}}} instead. | # Consult the keyboard(5) manual page. |
| Line 23: | Line 26: |
| * [[/MultimediaKeys|Configure additional multimedia key]] | XKBMODEL="pc105" XKBLAYOUT="us,de,fr,ua,ru" XKBVARIANT="" XKBOPTIONS="grp:alt_shift_toggle" |
| Line 25: | Line 31: |
| == Set Keyboard Layout in initramfs == | BACKSPACE="guess" }}} |
| Line 27: | Line 34: |
| The file /etc/initramfs-tools/initramfs.conf must be changed to have the localized keyboard layout at boot time: | * XKBMODEL is a keyboard model variable (look at a {{{/usr/share/X11/xkb/rules/base.lst}}} (plain text) or {{{/usr/share/X11/xkb/rules/base.xml}}} (XML) for a full list); * XKBLAYOUT variable contains a list of used layouts; * "grp:alt_shift_toggle" sets a layout switching key combination (<Alt>+<Shift>). |
| Line 29: | Line 38: |
| See also: * keyboard(5) man page. * Keyboard layout (keymap) section in [[http://www.debian.org/doc/manuals/debian-reference/ch08.en.html#_the_keyboard_input|debian-reference]] ("{{{dpkg-reconfigure --priority=low xserver-xorg}}}" command suggested by the page linked above does not work in Squeeze. You may try to add something like "{{{setxkbmap us,ru -option grp:ctrl_shift_toggle}}}" into {{{~/.xsessionrc}}} instead). * [[/MultimediaKeys|Configure additional multimedia keys]]. == How to set keyboard layout in initramfs == The appropriate section of {{{/etc/initramfs-tools/initramfs.conf}}} needs to be changed to have a localized keyboard layout at boot time: |
|
| Line 39: | Line 56: |
| Apply changes. |
Apply changes: |
| Line 45: | Line 61: |
| == Enable USB Keyboard in initramfs == | == How to enable USB keyboard in initramfs == |
| Line 47: | Line 63: |
| The initramfs-tools must include the usbhid module and its dependencies for USB keyboard support at boot time. Either the configuration file /etc/initramfs-tools/conf.d/driver-policy must include most modules, or they will have to be specified in another file: |
The initramfs-tools must include the {{{usbhid}}} module and its dependencies for USB keyboard support at boot time. Either the configuration file {{{/etc/initramfs-tools/conf.d/driver-policy}}} must include most modules, or they will have to be specified in another file: |
| Line 65: | Line 80: |
| If the configuration above was not set to include most modules then the necessary modules have to be specified in the file /etc/initramfs-tools/modules: |
If the configuration above was not set to include most modules, then the necessary modules have to be specified in the file {{{/etc/initramfs-tools/modules}}}: |
| Line 75: | Line 89: |
| Apply changes. |
Apply changes: |
| Line 80: | Line 93: |
== How to switch a keyboard layout in X11 / graphical desktop environment == Use your favorite desktop keyboard layout switcher applet. You can also switch the layout from the terminal, e. g.: {{{ $ setxkbmap de $ setxkbmap fr $ setxkbmap us }}} |
Contents
Keyboard configuration
The keyboard settings are stored in /etc/default/keyboard file. It's provided by keyboard-configuration package (it's a part of the console-setup source package), and other packages use this information in order to configure the keyboard on the console or in X Window System.
You can change your keyboard settings by:
# dpkg-reconfigure keyboard-configuration
As usual, it will prompt you for the model of keyboard (what the keyboard *is*), and then for the keyboard layout (what the keys should *do*). Use this tool to change your keyboard map, e. g. from QWERTY to QWERTZ or to Dvorak, or for non-English layouts.
You can also edit /etc/default/keyboard manually, here's an example:
# KEYBOARD CONFIGURATION FILE # Consult the keyboard(5) manual page. XKBMODEL="pc105" XKBLAYOUT="us,de,fr,ua,ru" XKBVARIANT="" XKBOPTIONS="grp:alt_shift_toggle" BACKSPACE="guess"
XKBMODEL is a keyboard model variable (look at a /usr/share/X11/xkb/rules/base.lst (plain text) or /usr/share/X11/xkb/rules/base.xml (XML) for a full list);
- XKBLAYOUT variable contains a list of used layouts;
"grp:alt_shift_toggle" sets a layout switching key combination (<Alt>+<Shift>).
See also:
- keyboard(5) man page.
Keyboard layout (keymap) section in debian-reference ("dpkg-reconfigure --priority=low xserver-xorg" command suggested by the page linked above does not work in Squeeze. You may try to add something like "setxkbmap us,ru -option grp:ctrl_shift_toggle" into ~/.xsessionrc instead).
How to set keyboard layout in initramfs
The appropriate section of /etc/initramfs-tools/initramfs.conf needs to be changed to have a localized keyboard layout at boot time:
# # KEYMAP: [ y | n ] # # Load a keymap during the initramfs stage. # KEYMAP=y
Apply changes:
# update-initramfs -u
How to enable USB keyboard in initramfs
The initramfs-tools must include the usbhid module and its dependencies for USB keyboard support at boot time. Either the configuration file /etc/initramfs-tools/conf.d/driver-policy must include most modules, or they will have to be specified in another file:
# # MODULES: [ most | netboot | dep | list ] # # most - Add most filesystem and all harddrive drivers. # # dep - Try and guess which modules to load. # # netboot - Add the base modules, network modules, but skip block devices. # # list - Only include modules from the 'additional modules' list # MODULES=most
If the configuration above was not set to include most modules, then the necessary modules have to be specified in the file /etc/initramfs-tools/modules:
# USB keyboard at boot usbcore uhci_hcd ehci_hcd usbhid
Apply changes:
# update-initramfs -u
How to switch a keyboard layout in X11 / graphical desktop environment
Use your favorite desktop keyboard layout switcher applet. You can also switch the layout from the terminal, e. g.:
$ setxkbmap de $ setxkbmap fr $ setxkbmap us


Welcome to the