Resources
This page is for rapid access to notes and configuration I may need to access from anywhere. Some bits and pieces may be of interest to other people as well, feel free to just go ahead and use [insert here license of the do-whatever-you-want-but-don't-bug-me style].
Keyboard layout
I use a custom keyboard layout to accommodate both programming needs and some occasional french text input. Essentially, it is a query keyboard with the following modifications:
- Number keys are shift-inverted, meaning pressing “1” gets me what I'd normally get pressing “Shift-1”, i.e., ”!” and reciprocally, “Shift-1” gets me the actual “1”.
- The right-alt key (a.k.a. AltGr or Ctrl-Alt) in combination with some letters get me the accentuated letter (useful for french input) or some unicode chars. For instance, “AltGr-e” is “é”, “AltGr-c” is “ç”, etc.
- Caps-lock is bound to Ctrl. This is critical if you're an emacs user.
Here are the resources for this mapping:
- Windows - Source file for Keyboard Layout Creator
- Windows - binary installation file
- Windows - registry file for transforming CAPS into a Ctrl at scancode level
- Linux - Read on.
The simple way to remap keys on Linux is using Xmodmap. Unfortunately, it doesn't work here because many applications are using the number keys with modifiers to handle switching between windows (e.g., mod1(alt)-[1-9] on irssi to switch channel or mod4(super)-[1-9] to switch between virtual desktop on XMonad). Xmodmap supports only the specification of key mapping for the Mod1 modifier and so desktop switching with Mod4 fails. More fine-grain mapping can be defined with xkb and it is on my todo-list to check that out. Actually, not a top priority because emacs' wonderful set-input-method covers pretty much all my very occasional french and japanese text input needs.