[Wellington-pm] HOP, and a question.
Sam Vilain
sam at vilain.net
Mon Jun 13 20:45:55 PDT 2005
michael at diaspora.gen.nz wrote:
>2. What was the setting you changed to get the Compose key to work?
>
>
(cc'ed to the perlmongers as perhaps many would like to know this...)
There are lots of options available for playing with the keymap.
Firstly, you could play with the settings in /etc/X11/XF86Config-4;
Something like this is a basic keyboard setup with the right windows key
set to be the compose key:
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "keyboard"
Option "CoreKeyboard"
Option "XkbRules" "xfree86"
Option "XkbModel" "pc101"
Option "XkbLayout" "us"
Option "XkbOptions" "ctrl:nocaps,compose:rwin"
EndSection
This will give you all the normal compose combinations, and get rid of
that annoying caps lock key. Eg, compose AE gets you Æ, compose Y= ¥,
compose << = «, etc. These are good and easy to remember and allow you
to enter most latin scripts and much punctuation successfully in many X
apps. I have been using `uxterm' for a while, which is xterm with the
unicode options all turned on and they just work.
To test this without restarting X;
xmodmap -e 'keycode 116 = Multi_key'
As well as compose, there's the "Mode_switch" key. This will let you
switch between alternate keymaps on your keyboard, so that entering
«»«»«»«»«»«» etc is just Right Alt (even labelled AltGr on some
keyboards) + Z/X. If your Mode_switch key isn't working, it's because
the symbol map you chose only has one group of symbols. Try turning it
on with:
xmodmap -e 'keycode 113 = Mode_switch'
In theory, XKB is a flexible infrastructure for doing these sorts of
changes with handy short options in the config, however I could never
find any decent documentation, and I'm highly suspicious that the system
is more implementation than docs or spec. I got the "compose:rwin"
option from /usr/X11R6/lib/X11/xkb/rules/xfree86
However IMHO XKB really shines in its general purpose, fully editable
keymap mode. Using this:
xkbcomp :0.0 some-file
Will grab the keymap and put it into a file that is vaguely
decipherable. With that and 'xev', you can just about figure out what's
going on. Reverse the arguments to compile your changes into the
current X server. Once you're happy, you just need to make sure it gets
run during your login process, by putting it in your .xsession /
.xinitrc if you have one. Ideally you should have the keymap load
before your window manager.
Personally, I always "carry around" my own keymap, as I do other things
too, like make sure my "Alt" key and "Meta" key (usually incorrectly
labelled with a Windows logo) are really "Alt" and "Meta" (this
behaviour always seems to be unpredictable), and make my left control
key do what the "Front" key on Solaris X did. And then I also can fine
tune it for individual systems, such as extra "internet hot keys".
I've attached my xkb map, in case like me, you can't figure out how to
get the default X to put "Group2" symbols into your key map (ie,
Mode_switch did nothing). Note that it uses the traditional Unix layout
location of the control key (ie, next to "A"). Various people recommend
using that key for that purpose; I am one of them for the simple reason
it's a key you hit a lot, so putting it there is easier on your hands.
Sam.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: samv.xkb
Url: http://mail.pm.org/pipermail/wellington-pm/attachments/20050614/27020295/samv.pl
More information about the Wellington-pm
mailing list