for purpose of reference: reconfigure the EeePC keyboard layout on X
I like my EeePC 901, though the missing navigation keys hit me a bit, and getting a pipe symbol (|) with one hand is wrist-flipping (AltGr+Function+Y [on a German keyboard]). I knew I had to fix that, and now I’ve done it.
As a solution, I set up some alternative keys to trigger:
- lesser than
- greater than
- pipe
- Home
- End
- Prev Page/Page Up
- Next Page/Page Down
Note: This article is going to be a bit more long. Hence, if you want, you can just skip to the howto. Oh, and by the way, the solution provided is for the X server, not for Windows.
For the navigation keys, initially I thought I could just reuse the given navigation keys Up/Down/Left/Right by hitting them while holding down AltGr. Though, that didn’t work, so I had to find some new keys to use. As I am a right-handed person and as I don’t want to occupy the other hand for navigational tasks too, the right side of the keyboard is the only choice.
In that area we’ve got the AltGr key available as a modifier. Also, there is a mouse menu key — pretty pointless as the big touchpad is right next to it. So, alternatively, I could use that mouse key as another modifier key. But it turned out that didn’t work, so I have AltGr as the only modifier available.
Since I couldn’t reuse the menu key in any other obvious beneficial way, I decided to make it become Page Down. Of the missing navigational keys, Page Down is the most important one since on web pages and other large documents you start at the top and want down, not upwards. In browsers, usually the spacebar works also, but in editors hitting the spacebar gives you a space, not a Page Down.
Next, Page Up, since Page Down is rather silly. So what key to use? — I picked ‘.’ (period) since its almost straight North of the menu key.
Since there’s no other use for the menu key, I made the menu key be Page Down without any modifier to be held down, though to stay able to use the period as usual, to make it be Page Up, it must be used together with the chosen modifier, AltGr.
On trying out AltGr as a navigational modifier, I learned that it’s cruical to be able to use the key-to-be-modified with the middle finger, and that conveniently. So, choice what to use for Home and End became quite restricted.
I selected L and the character second-right to it, ‘Ä’ on a German keyboard. — I left the one-key gap in between since the keys out there in the periphery are a bit more slim, and the L/Ö alternative felt not as convenient as using L and Ä.
On the issue about the lesser-than and greater-than symbols as well as the pipe one, I chose to keep them in the bottom left corner of the keyboard. In German layout, the bottom left key is Y.
Originally, to get a Pipe, you need to press AltGr-Function-Y. Doing this one-handedly requires quite a bit of training, but still you often will achieve AltGr-Y only, which gives you some angle-bracket like quotation mark.
Also, to get a greater-than character, you need to perform a similar bit of keyboard artistic — AltGr-Shift-Y.
That’s a bit inconvenient. Instead, I decided to untangle those four characters a bit: I want a two-keys combination at max. That is: AltGr+Y gives lesser-than, AltGr+X be greater-than. And for purpose of convenience I put the pipe North of X and Y: AltGr+S gives Pipe. Perfect.
Sidenote: The key next to the backspace, on a German keyboard layout is rather pointless: Originally, it features the single quotation mark and the backtick, though there’s another key nearby, featuring the very single quotation mark and the number sign — and AltGr gives you the backtick too. As AltGr+# or Shift+’ is the same number of keystrokes, alternatively, you could dump the key next to the backspace completely and put lesser-/greater-than and pipe there. — I did not so because I learned about AltGr+# only after I was done with configuring, and you might also want to keep the usual keys (like single quotation mark/backtick) untouched.
How To Do It
Here is how I applied the modifications:
First, XModMap is the tool of choice.
On the console, I retrieved the current, i.e. system-given, settings for my keyboard by xmodmap -pke. I immediately stored that output to ~/.xmodmaprc where it will be read from, each time I’ll re-login: $ xmodmap -pke > ~/.xmodmaprc
I opened ~/.xmodmaprc, skimmed through it to find the key occupations I was after: Y, X, S, L, Ä, period, menu key. As that’s not what you are interested in, here’s just what the respective entries look like in my modified ~/.xmodmaprc now:
- keycode 39 = s S bar section bar section
- keycode 46 = l L Home Left Home Left
- keycode 48 = adiaeresis Adiaeresis End asciicircum End asciicircum
- keycode 52 = y Y less guillemotleft less guillemotleft
- keycode 53 = x X greater guillemotright greater guillemotright
- keycode 60 = period colon Prior division Prior division
- keycode 117 = Next
If you, as I do, never log out of your current session (due to the convenience of hibernate mode), you can make the changes work immediately, without any need to restart the session first: On a console, for every of the above keycode lines, issue a
$ xmodmap -e "keycode line“
Notes: You don’t need to be root to gain the effect. And everything will be in effect just after you issued the modification command. To undo any modification, just restore the original look of the keycode line from the editor, then issue that by another xmodmap -e " ... ".
![(CC) BY-NC-SA I'm[Nannie] / Flickr; example EeePC keyboard (en) (CC) BY-NC-SA I'm[Nannie] / Flickr; example EeePC keyboard (en)](http://dagobart.files.wordpress.com/2009/02/eeekbd-en.jpg?w=300&h=199)