apple.X11 and german keyboard

couzteau

Registered
hello,

i really like the speed of the new x11 server, but i can't find a way to set my keymappings to the german keyboard of my tibook.

xmodmap doesn't understand the file /System/Library/Keyboards/Deutsch.keymapping because it's a binary

and i don't have a modmap that would fit.

cheerz
 
That's one thing I always wondered about. It is so annoying under OSX: the usual FreeBSD locale procedure does not work. Not for the login method, not for the environment method, it simple does not do... but still all the locale files exist under /usr/share/locale. They remain undocumented by Apple and in my eyes serve as a backward compatibility for ported unix application. Sort of problematic...
 
The same problem here (but on a Spanish keyboard).

This has been a real pain in the ass for some time... Not much help anywhere (I google'd and posted querys on forums).

After some digging and man page reading I found two nifty little X11 apps.

One is called 'xmodmap' and can assign X11 events (one character or meta) to keyboard codes. It has a special programming directive language that basically assigns <keycode> --> <event>.

To know which keyboard codes are invoked when a real key is pressed one uses another program (can't remember which one), it might be called 'xd' or something like that as it is a 'X' event debugger. By pressing the different keys sequentially over the 'xd' window, the program blurts a lot of debugging info on the invoking term output, including the keyboard code.

You can build a 'xmodmap' file to be read at startup of the X11 session so everytime you start the X11 server the correct keycodes work.

I have to go now, but if anyone is interested, just private-mail me and will post more details once I'm actually in front of my Cube.

dani++
 
I am in front of my CUBE right now.

The util that modifies the keyboard mappings is xalled 'xmodmap', the manual is not very helpful.

The util I used to capture X11 events is called 'xev'. It is also included in Apple's X11.

xmodmap accepts file that have lines like:

keycode 26 = 1 exclam bar

This simple command assigns three characters to the keycode '26', '1' is got by simply pressing it, '!' is with shift and '|' with alt.

The names of the chars were extracted by looking at what is reported on 'xev' using the default USA keyboard (which I know by heart). Issuing a 'xmodmap -pke' prints the current config.

This worked like a charm on a regularly compiled X11 (via Fink). It was only a matter of compiling keycodes and the character symbolic names.

However, it seems that on Apple's X11 the original mapping of the ALT key is botched and I haven't figured out how to get it right. The only shift keys work.

I will post if I make any progress. BTW, could you please tell us what insight your German friend was referring to? Thanx.


dani++
 
Back
Top