zero-based keyboard
My thinkpad keyboard is frequently used to code C++ with its zero-based arrays. So, why not make the key-board zero-based?
software
Changing the software was harder than the hardware.
In Debian Wheezy, the keyboard configuration is handled by xkb, not only in x sessions, but also in the virtual consoles (hooray!). There are different layers in which the digit order can be fixed. By changing the keycodes (for me /usr/share/X11/xkb/keycodes/evdev) the "low-level" codes send by the keyboard can be reinterpretted (eg code AE01 stands for key 10, but can be set to key 19). However, this also changes the behavior of the symbols on the digit-keys (when holding the shift-key). And I'm not ready for that yet (or already too old...). It would make the distance of the opening and closing oparentheses 10 keys.
A more subtle solution was changing the ‘symbols’. For me
this meant changing lines 9 to 18 of the file
/usr/share/X11/xkb/symbols/us
to:
key { [ 0, exclam ] };
key { [ 1, at ] };
key { [ 2, numbersign ] };
key { [ 3, dollar ] };
key { [ 4, percent ] };
key { [ 5, asciicircum ] };
key { [ 6, ampersand ] };
key { [ 7, asterisk ] };
key { [ 8, parenleft ] };
key { [ 9, parenright ] };
Afterwards, I ran sudo dpkg-reconfigure
keyboard-configuration
, but I do not know if this is
necessary. In addition, I rebooted my machine (the horror!) to make
the changes take effect.
hardware
Changing the physical order of the digits was easy. My daughter has a life long experience with ripping of the keys of my thinkpad:
mental
And now comes the biggest challenge: relearning my keyboard-mental
map. Most of my passwords have digits in them... In addition, I now
see that I use the 9-key, I meant... 0-key very often while
programming to get to the first zeroth character of the
current line.
However, the better
screen
-experience
is nice for switching between its zero-based windows. And I can now
try to use the extensibility of my window manager xmonad to
make the workspaces zero-based (Yes, succeeded by using this xmonad.hs (0.10)).