X11_Keyboard
This article is still a Stub. You can help Gentoo-Wiki by expanding it.
|
Contents |
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 |
Keyboard Mappings
When you first convert over from pc105 to evdev as your keyboard driver, some keyboard mappings are probably going to go crazy. The first one I noticed was cursor key mappings were gone. This makes bash interesting. Here's how I fixed it; I got this solution from the fedora mailing lists.
| File: /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi |
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.keymap">
<append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
</match>
<match key="info.capabilities" contains="input.keys">
<merge key="input.xkb.rules" type="string">xorg</merge>
<!-- If we're using Linux, we use evdev by default (falling back to
keyboard otherwise). -->
<merge key="input.xkb.model" type="string">keyboard</merge>
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name"
string="Linux">
<merge key="input.xkb.model" type="string">evdev</merge>
</match>
<merge key="input.xkb.layout" type="string">us</merge>
<merge key="input.xkb.variant" type="string" />
</match>
</device>
</deviceinfo>
|
| File: /etc/X11/xorg.conf |
Section "InputDevice"
Identifier "Generic Keyboard"
Option "CoreKeyboard"
Option "XkbLayout" "us"
Option "XkbModel" "evdev"
Option "XkbRules" "xorg"
Option "evBits" "+1"
Option "keyBits" "~1-255 ~352-511"
Option "Pass" "3"
Driver "evdev"
EndSection
|
The input.xkb.rules needs to be changed from base to xorg. Then the keyboard seems to work properly. This causes all kinds of interesting problems if you try and use remote desktop solutions like nxclient. It's also recommended you modify your "InputDevice", but if you're using Hal this seems to be the right solution.
XkbOptions
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
LinEAK
If someone has time - please put something about lineak here.
ebuilds of interest:
also check out the LinEAK project pages on sf
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.
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
|
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.
Created by NickStallman.net, His Dark Materials - The Golden Compass, Luxury Homes Australia
Real estate agents should be using interactive floor plans.
