On Wed, May 16, 2007 at 02:48:53PM +0200, Matthias Brennwald (bwm) wrote: > Therefore: is it possible to explicitly tell X11 how to handle the > behaviour of a given keystroke that is not otherwise handled by the > 'normal' keymap settings? If so, I'd like to make 'Alt-g' to produce an > '@' (that's the way it's normally done on my keyboard). Try using ~/.Xmodmap. I don't use the gnome desktop, so you might have to kick it and swear hard to get that to work (or call it ~/.xmodmaprc, or explicitly load it from .xsession, or some other variation).
Traditionally, apple keyboards have been wilfully different, at least on laptops. With the move to xkeyboard-config, you might find that there is a better layout already defined (I don't know where debian puts it, but somewhere under xkb/symbols/ e.g. look at macintosh_vndr/de if you have one). If that doesn't help, here are some random lines from the modmap I was using on my ibook with xorg-6.9 (I don't seem to have my current map to hand). This is a nominally british keyboard, but in practice it is american except with £ where # should be, and no direct access to the # symbol. ! add # on AltGr 3 keycode 12 = 3 sterling numbersign ! use KP_ENTER for compose - similar place to right windows/menu ! key;) keycode 108 = Multi_key ! remap the `~ to left of Z correctly keycode 94 = grave asciitilde ! use apple keys for AltGr (on ibook, both keys generate same code) clear Mod2 keycode 115 = Mode_switch add Mod2 = Mode_switch Of course, when you map an external keyboard correctly, the built-in keyboard will probably not be correct. You might find it easiest to dump the current keymap to a file before you start, e.g. xmodmap -pk >oldkeys so that you have a slightly easier way back if it goes wrong, and also so that you can see exactly what is/isn't defined (on the other hand, I get obsessional about X keymaps - my current ibook modmap has a vast number of entries so that I can access most of the keys I might want to use - strangely on desktops the keymaps with dead keys do all I need except set up the compose key, so you might be happy with minimal changes). To see what values are generated by a key in X, use xev from a term and look for the 'keycode' value. HTH ĸen -- das eine Mal als Tragödie, das andere Mal als Farce