View Single Post
Old 02-19-2008, 09:42 AM   #1
yokos
Pac-Man caught my iLiad.
yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.yokos can teach chickens to fly.
 
yokos's Avatar
 
Posts: 807
Karma: 3595
Join Date: Apr 2006
Location: Germany; next to Baltic Sea
Device: Boox Max Lumi, iRex iLiad (RIP)
Switching the Layout of the USB Keyboard.

The USB Keyboard server comes with an US layout. If you have a non-US USB keyboard in front of your nose, you will have a problem.
Therefore we need a way to change the keymaps of the keyboard.
xmodmap is one way.

Right now only a German keymap is included. [EDIT II: not anymore true.]
A keymap is just a simple text file with keycodes on the left, the letter/symbol on the right.
Code:
keycode  10 = 1 exclam onesuperior exclamdown onesuperior exclamdown
keycode  11 = 2 quotedbl twosuperior oneeighth twosuperior oneeighth
keycode  12 = 3 section threesuperior sterling threesuperior sterling
keycode  13 = 4 dollar onequarter currency onequarter currency
keycode  14 = 5 percent onehalf threeeighths onehalf threeeighths
keycode  15 = 6 ampersand notsign fiveeighths notsign fiveeighths
keycode  16 = 7 slash braceleft seveneighths braceleft seveneighths
If you know a place where keymaps of other/"all" languages live, please let me know. [EDIT II: 85 xmodmaps are attached.]

The symbols files (keymaps) in /usr/share/X11/xkb/symbols on my Desktop Linux distribution where not compatible with xmodmap.
I created the attached German keymap [while a German layout is active] with
Code:
xmodmap -pke > keymap
xkeycaps is another option [not checked out yet].

[EDIT 02/20/2008] Oh no, xkeycaps needs xmkmf to compile. Uncharted water for me.
[EDIT 02/21/2008] 85 xmodmaps are attached. All the best! I hope it works for you.
you-have-to-do:
# w/o editing txt/shell scripts:
You have to rename the wanted xmodmap (for instance xmodmap.be) to de, then replace the original in the xmodmap dir.
#w/ editing txt/shell scripts:
Edit the red parts to your need.
manifest.xml:
Code:
<Description>Changing the USB Keyboard Layout
German Layout</Description>
run.sh
Code:
./xmodmap de > output.txt 2>&1
[EDIT 02/22/2008] I replaced 85_xmodmaps.zip with 95_xmodmaps.zip [the same 85 + 10 others]

screenshot: it shows Beaver with typed German specific letters.
Attached Thumbnails
Click image for larger version

Name:	Beaver_German_Keymap.png
Views:	675
Size:	73.9 KB
ID:	10526  
Attached Files
File Type: zip xmodmap.0.1.German.Layout.zip (26.4 KB, 490 views)
File Type: zip 95_xmodmaps.zip (135.6 KB, 486 views)

Last edited by yokos; 02-22-2008 at 08:34 AM. Reason: EDIT III
yokos is offline   Reply With Quote