Subject: Define X compose key
To: None <netbsd-help@NetBSD.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 04/21/2005 01:31:52
How do I define a compose key in X? I have not defined a locale.
In NetBSD 1.5, with XFree86 3.x, I could type a 3-character sequence to
get the Swedish A-with-a-circle-on-top. The Compose key on that machine
was <ctrl>+<shift>+T:
$ grep aring /usr/X11R6/lib/X11/locale/iso8859-1/Compose
<Multi_key> <a> <asterisk> : "\345" aring
<Multi_key> <asterisk> <a> : "\345" aring
Ctrl<T> <a> <asterisk> : "\345" aring
Ctrl<T> <asterisk> <a> : "\345" aring
Now I have XFree86 4.4 (on i386), and the Ctrl<T> are gone. With my
keyboard defined as:
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
Option "XkbLayout" "us_intl"
Option "XkbVariant" "nodeadkeys"
EndSection
(I *think* I need us_intl. I set nodeadkeys because dead keys -- now that
I know what they are -- are annoying. If I type '~', I see nothing
because the system is waiting for me to type, say, 'n', to get
n-with-tilde. It gets swallowed unless followed by the space bar. Very
annoying if you want, say, to access your home directory. )
AFAICT, there's no default Compose key defined for me. I tried creating
an Xmodmap file:
$ cat ~/.Xmodmap
keycode 78 = Multi_key
as suggested in the Linux Danish HOWTO. It isn't honored, according to
xev:
KeyPress event, serial 30, synthetic NO, window 0x1400001,
root 0x40, subw 0x0, time 1841902, (-609,-496), root:(1001,636),
state 0x0, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 30, synthetic NO, window 0x1400001,
root 0x40, subw 0x0, time 1842023, (-609,-496), root:(1001,636),
state 0x80, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,
XLookupString gives 0 bytes:
Google in this case is littered with dead ends and references to obsolete
solutions. What's the Right Way nowadays?
Many thanks....
--jkl
--