HOWTO X11 Keyboard
From Gentoo Linux Wiki
This article is still a Stub. You can help Gentoo-Wiki by expanding it.
|
Contents |
[edit] Keyboard Layout
| File: /etc/X11/xorg.conf |
Section "InputDevice" Identifier "Generic Keyboard" Driver "keyboard" Option "CoreKeyboard" Option "XkbRules" "xorg" Option "XkbModel" "pc105" # US, German, Dvorak Option "XkbLayout" "us,de,dvorak" # Switch layout with <ALT>+<SHIFT> Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll" # watch out, the commas are important. Assign nodeadkeys to de Option "XkbVariant" ",nodeadkeys," EndSection |
Other XkbOptions (the same as in /usr/share/X11/xkb/rules/xorg.lst).
Which keys you can choose for switching between languages in /etc/X11/xorg.conf file:
- grp:switch — toggle using right alt key, but only until unpressed
- grp:lswitch — Left Alt key switches group while pressed
- grp:lwin_switch — Left Win-key switches group while pressed
- grp:rwin_switch — Right Win-key switches group while pressed
- grp:win_switch — Both Win-keys switch group while pressed
- grp:toggle — Right Alt key changes group
- grp:lalt_toggle — Left Alt key changes group
- grp:caps_toggle — Caps Lock key changes group
- grp:shift_caps_toggle — Shift+CapsLock changes group
- grp:shift_toggle — Both Shift keys together change group
- grp:alts_toggle — Both Alt keys together change group
- grp:ctrls_toggle — Both Ctrl keys together change group
- grp:ctrl_shift_toggle — Control+Shift changes group
- grp:ctrl_alt_toggle — Alt+Control changes group
- grp:alt_shift_toggle — Alt+Shift changes group
- grp:menu_toggle — toggle using "context menu" key on Windows keyboards
- grp:lwin_toggle — toggle using left win key on Windows keyboards
- grp:rwin_toggle — toggle using right win key on Windows keyboards
- grp:lshift_toggle — Left Shift key changes group
- grp:rshift_toggle — Right Shift key changes group
- grp:lctrl_toggle — Left Ctrl key changes group
- grp:rctrl_toggle — Right Ctrl key changes group
Possible signs using grp_led:
- grp_led — use keyboard leds to indicate group change
- grp_led:num — Num_Lock led indicates group change
- grp_led:caps — Caps_Lock led indicates group change
- grp_led:scroll — Scroll_Lock led indicates group change
if you have problems with setting up your keyboard, /etc/X11/xkb/README.config will be most helpful for you, so make sure to read that file
[edit] LinEAK
If someone has time - please put something about lineak here.
ebuilds of interest:
also check out the LinEAK project pages on sf
[edit] XOrg 6.9 or Greater, evdev, and USB Keyboards
The details for setting up evdev support for your kernel and X.org can be found here.
[edit] Logitech Cordless Desktop Pro
| File: /etc/X11/xorg.conf |
Section "InputDevice"
Identifier "Generic Keyboard"
Option "CoreKeyboard"
Option "XkbLayout" "dk"
Driver "evdev"
Option "evBits" "+1"
Option "keyBits" "~1-255 ~352-511"
Option "Pass" "3"
EndSection
|
[edit] xmodmap
Now there's still the problem of howto map the X11-KeyCodes to actual keys, usable by your windowmanger. If you dont't want to install additional software, go the xmodmap way. You still have to map the generated keycodes to various functions/applications in your windowmanger(e.g. by using khotkeys for KDE). If you install xbindkeys you can assign applications to your keys in a non-windowmanger-specific way. You can even map shortcuts and mouse-events to your keys, if you use xte.
