Gentoo Archives: gentoo-user

From: Vincent Launchbury <vincent@×××××××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Modify keymap
Date: Wed, 13 Jan 2010 15:52:49
Message-Id: 4B4DEC21.4090209@doublecreations.com
In Reply to: [gentoo-user] Modify keymap by Xianwen Chen
1 Xianwen Chen wrote:
2 > I can't use the letter "ø" because this key doesn't exist on an en_US
3 > keyboard.
4 >
5 > To solve this problem, I want to modify the layout file, to set the
6 > "Windows" key to "ø". Does anyone know which file shall I touch?
7
8 You might be able to use x11-apps/xmodmap. Grab x11-apps/xev to find out
9 the keycode, which is usually 115 for the windows key:
10
11 Run xev and press the key, then watch for output like:
12 state 0x0, keycode 115, ...
13
14 Then get the keysym for ø by doing:
15 $cat /usr/include/X11/keysymdef.h |grep -i oslash
16 #define XK_Oslash 0x00d8 /* U+00D8 LATIN CAPITAL LETTER O WITH STROKE */
17 #define XK_oslash 0x00f8 /* U+00F8 LATIN SMALL LETTER O WITH STROKE */
18
19 Then create ~/.Xmodmap, here's the relevant part of my file:
20 $cat ~/.Xmodmap |grep 115
21 keycode 115 = 0x00f8
22
23 Then, the command:
24 $xmodmap ~/.Xmodmap
25 is required to make the changes, so just add it to your .xinitrc or the
26 startup file for whatever desktop environment you're running.
27
28 This works fine for me in anything that supports unicode, although
29 strangely it doesn't work in xterm.
30
31 Note that I'm not using dvorak, but I don't see that making a
32 difference. Good luck :). øøø!
33
34 Kind Regards,
35 Vincent.

Replies

Subject Author
Re: [gentoo-user] Modify keymap Xianwen Chen <xianwen.chen@×××××.com>