[xmonad] My ALTernative revelation

Thomas Friedrich info at suud.de
Tue Jun 9 11:08:54 EDT 2009


Andrew Sackville-West wrote:
> On Mon, Jun 08, 2009 at 04:10:58PM -0400, Brent Yorgey wrote:
>   
>> On Sun, Jun 07, 2009 at 07:31:07PM -0700, Andrew Sackville-West wrote:
>>     
>>> On Sun, Jun 07, 2009 at 03:20:19PM -0400, Brent Yorgey wrote:
>>>       
>>>> My laptop has no windows key,
>>>>         
> [...]
>   
>>>>  So I mapped left alt to Mod3 and use that as my mod key,
>>>> and the right alt key went on happily being good old alt.  Now I can
>>>> once again use all those alt shortcuts.
>>>>         
> [...]
>   
>>> my clicky old ibm model m has no windows key, so I mapped the
>>> caps-lock as mod leaving me with no collisions with the alt key. Plus
>>> I have no caps-lock key anymore avoiding the tYPICAL pROBLEM tHERE.
>>>
>>>       
> [...]
>   
>> This is a good idea, and I actually tried this a while ago, but there
>> were some key combinations with caps-lock that my keyboard generated
>> no events for.  This is when I learned that in order to save
>> space/materials/money, keyboards are constructed in such a way that
>> there are quite a few key combinations between which the hardware
>> can't tell the difference, since there is not a dedicated wire for
>> each key. 
>>
>>     
>
> I never cease to be amazed at these things. Who would have thought? 
> I haven't found any such combinations yet, and hopefully I won't. I
> suspect not. back in '88 they probably wouldn't have thought to do
> that to a keyboard... I hope.
>   

Now that everybody is talking about their keyboard remapping 
experience... ;)

I use the classic Dvorák layout.  The one where the numerical part of 
the keyboard reads

7 5 3 1 9 0 2 4 6 8

where the 7 starts, where the 2 is on a QWERTY.  So that leaves two keys 
on the left of the 7 and one key to the right.  So, I mapped the 
QWERTY-1 to Super_L which I use as my modifying key in Xmonad.  This way 
I don't have to reach *down* to control the WM but *up*, which is so 
much more convenient.  Especially when switching workspaces :)  I also 
mapped Tap -> Alt and Caps-Lock -> Control.  Good for emacsen.

Happy Hacking,
Thomas

PS.  If u want to try it out, put the attached file in the folder with 
your X11-keymaps (e.g. on a Ubuntu this would be /etc/X11/xkb/symbols/, 
or on a Arch Linux, /usr/share/X11/xkb/symbols/), and change the 
keyboard layout in your xorg.conf to "dvorakx" :D

-------------- next part --------------
// Dvorak X Adaption by Thomas Friedrich (www.suud.de)
// X = Vim, Emacs, LaTeX, Lisp, Xmonad
// To use this keymap, use a 105-key-keyboard and change
// your xorg.conf to
//
// Section "InputDevice"
//	Identifier	"Generic Keyboard"
//	Driver		"kbd"
//	Option		"XkbRules"	"xorg"
//	Option		"XkbModel"	"pc105"
//	Option		"XkbLayout"	"dvorakx"
// EndSection
//
partial alphanumeric_keys
xkb_symbols "dvorak-gell" {

    name[Group1]= "Dvorak GELL Adaption";

    // Alphanumeric section

    key <ESC>  { [ Caps_Lock ] };

    // Keyboard row number: +2
    key <TLDE> { [ Tab, ISO_Left_Tab, Tab, ISO_Left_Tab ] };
    key <AE01> { [ Super_L, Hyper_L, Super_L, Hyper_L ] };
    key <AE02> { [ 7, trademark ] };
    key <AE03> { [ 5, copyright ] };
    key <AE04> { [ 3, registered ] };
    key <AE05> { [ 1, section ] };
    key <AE06> { [ 9, parenleft ] };
    key <AE07> { [ 0, parenright ] };
    key <AE08> { [ 2, EuroSign ] };
    key <AE09> { [ 4, sterling ] };
    key <AE10> { [ 6, dollar ] };
    key <AE11> { [ 8, cent] };
    key <AE12> { [ Escape, Escape, Escape, Escape ] };

    // Keyboard row number: +1
    key <TAB>  { [ Alt_L, Meta_L, Alt_L, Meta_L ] };
    key <AD01> { [ udiaeresis, Udiaeresis, bracketleft ] };
    key <AD02> { [ comma, semicolon, plus ] };
    key <AD03> { [ period, colon, dollar ] };
    key <AD04> { [ p, P, bracketright ] };
    key <AD05> { [ y, Y, slash ] };
    key <AD06> { [ f, F, backslash ] };
    key <AD07> { [ g, G, braceleft ] };
    key <AD08> { [ c, C, backslash ] };
    key <AD09> { [ r, R, dollar ] };
    key <AD10> { [ l, L, braceright ] };
    key <AD11> { [ apostrophe, quotedbl ] };
    key <AD12> { [ question, exclam ] };

    // Keyboard row number: 0
    key <CAPS> { [ Control_L, Control_L ] };
    key <AC01> { [ a, A, asciitilde, dead_tilde ] };
    key <AC02> { [ o, O, less ] };
    key <AC03> { [ e, E, minus ] };
    key <AC04> { [ u, U, greater ] };
    key <AC05> { [ i, I, parenleft ] };
    key <AC06> { [ d, D, parenright ] };
    key <AC07> { [ h, H, grave, dead_grave ] };
    key <AC08> { [ t, T, ampersand ] };
    key <AC09> { [ n, N, acute, dead_acute ] };
    key <AC10> { [ s, S, at ] };
    key <AC11> { [ ssharp, slash ] };
    key <BKSL> { [ minus, underscore, bar, brokenbar ] };

    // Keyboard row number: -1
    key <LSGT> { [ adiaeresis, Adiaeresis, bar, brokenbar ] };
    key <AB01> { [ odiaeresis, Odiaeresis, asciicircum, dead_circumflex ] };
    key <AB02> { [ q, Q, colon ] };
    key <AB03> { [ j, J, equal ] };
    key <AB04> { [ k, K, asterisk ] };
    key <AB05> { [ x, X ] };
    key <AB06> { [ b, B ] };
    key <AB07> { [ m, M, numbersign ] };
    key <AB08> { [ w, W, percent ] };
    key <AB09> { [ v, V, degree ] };
    key <AB10> { [ z, Z, section ] };

    // Keyboard row number: -2
    key <LCTL> { [ Caps_Lock ] };
    key <SPCE> { [ space, Escape, space, Escape ] };

    include "level3(ralt_switch)"
};


More information about the xmonad mailing list