¡Esta es una revisión vieja del documento!
Tabla de Contenidos
Establecer una distribución del teclado
Establecer un diseño de teclado es un paso necesario si no desea el diseño predeterminado nosotros
. Además, algunas personas a menudo necesitan cambiar entre diseños. A continuación encontrará formas de configurar / cambiar la distribución del teclado tanto en la consola como en X.
Teclado en la consola
La distribución del teclado se establece primero durante el proceso de instalación, donde se le pide que elija un mapa de teclado relevante. Esta configuración solo se aplica a la consola antes de iniciar el servidor X (GUI).
Se puede cambiar en/etc/rc.d/rc.keymap
:
#!/bin/sh # Load the keyboard map. More maps are in /usr/share/kbd/keymaps. if [ -x /usr/bin/loadkeys ]; then /usr/bin/loadkeys uk.map fi
Como puede ver arriba, uso el diseño del Reino Unido. Se pueden encontrar más diseños de teclado en el directorio mencionado anteriormente.
/etc/rc.d/rc.keymap
. Si, en una etapa posterior, necesita cambiarlo, deberá crear ese archivo, copiar el código anterior y elegir uno de los mapas de teclas disponibles en el directorio /usr/share/kdb/keymaps/
.
Keyboard Layout in X
Setting up a keyboard layout for X can be done in 2 ways: system-wide (regardless of your desktop environment or user) or on a desktop environment / window manager level.
Setting the Layout System-wide
Slackware 13.0 and 13.1
In Slackware 13.0 and 13.1 hal
was responsible for keyboard mapping:
Copy the relevant .fdi
file to /etc/hal/fdi/policy/
:
cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/
Edit the file:
vim /etc/hal/fdi/policy/10.keymap.fdi
Replacing us
with a keymap of your choice (in my case it is gb
):
<merge key=“input.xkb.layout” type=“string”>us</merge>
<merge key=“input.xkb.layout” type=“string”>gb</merge>
Slackware 13.37 and 14
From Slackware 13.37 on, udev
has taken over keyboard mapping functions and the procedure has changed as well:
cp /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf /etc/X11/xorg.conf.d/
Edit the 90-keyboard-layout.conf
file specifying the layout (eg. gb
):
vim /etc/X11/xorg.conf.d/90-keyboard-layout.conf
Section "InputClass" Identifier "keyboard-all" MatchIsKeyboard "on" MatchDevicePath "/dev/input/event*" Driver "evdev" Option "XkbLayout" "gb" #Option "XkbVariant" "" Option "XkbOptions" "terminate:ctrl_alt_bksp" EndSection
You also need to restart X for the change to take effect.
Setting the Layout in Particular Desktop Environments / Window Managers
Some environments by default include GUI tools to set the keyboard layout while others require tweaking the startup files and a manual use of the setxkbmap
command. You can use this command at any time if you want to change the keyboard layout in X. You might need to restart certain applications for the changes to take effect.
This, for example, would switch your keyboard layout to Polish:
setxkbmap pl
Below are some ways of changing keyboard layouts within particular desktop environments or window managers.