On Tue, 17 Feb 2004, Martin Stubenschrott wrote: > However, actually I don't want to disable this key completely, but > switch between a german and english keyboard layout. So I want, that > when CapsLock is on, I can use the english layout (much better for > programming) and when the key is off to use my german layout (i need > this for the umlauts like ����). Has anybody an idea, how I can > achieve this? Probably with xmodmap, but how?
The location of the CapsLock key is too useful to serve the purpose of a caps lock switcher or the purpose of a keyboard layout switcher. You may consider mapping CapsLock into Ctrl (which is where Sun keyboards have it; many people find this to be a good ergonomic choice), and move the CapsLock functionality to some other key, like one of previous Ctrl locations. But, if you don't need to change keyboard layouts every now and again, you would kind of waste a key by doing so, for you could define some less-accessible key combination to switch the keyboards instead. As for switching keyboards, there are several programs that enable you to do that, e.g.: $ apt-cache search keyboard | grep switch xxkb - Keyboard state indicator and switcher for xkb wmkbd - WindowMaker dock app which can define/modify/switch keyboard maps xkeysw - A keyboard layout switch for the X Window System xruskb - An X localized keyboard switch and autolock. Note that if you hack in Emacs you don't have to use them. ;-) As for playing with the modmaps, you can use ``xkeycaps'', an easy-to-use GUI frontend to modmaps.
