// // MirrorBoard one-hand keymapping // Hacked together by Randall Munroe and neale // 2007-06-25 // // This is a keymapping for occasional left-handed typing. // Run it with // xkbcomp mirrorboard.xkb $DISPLAY // (optionally, 2>/dev/null -- it prints a lot of warnings) // Skip past all this text to 'MAP START' to see/edit the // actual mappings. // // Changes: // 2007-11-25, Richard Donkin: // Space changed to activator instead of caps. // Windows key means space. // Changed mappings to allow easier punctuation entry. // // This code comes with no warranty whatsoever and is not // suitable even for its intended purpose. // One-handed layouts are interesting but hard to learn. // I noticed, however, that with little effort I could // type with my left hand as if it were my right. That is, // if I take my right hand away from the keyboard and tell // my left hand to type the word 'parking', with a little // effort, 'qardevg' comes out. I'm doing the same hand // motions I'd do with both hands, but constraining them // to one hand. // // I noticed that when casually switching windows with the // mouse to type responses on IRC, it was convenient when // the responses could be typed entirely with my left hand. // 'lol' cannot, but 'sweet' can. I have yet to have a // chance to say 'we fear a few dwarf watercraft // stewardesses were regarded as desegregated after a great // texas tweezer war', but boy is it weird to type. // // So I realized that if I set a modifier key (space) // to switch layouts such that q was p, w was o, and so // forth, I could write 'parking' with my left hand, by // typing // // The nice thing about this is that I can do it without // learning a new layout -- once I got it working, I was // able to use it right away. I find it's really handy // to be able to type things like 'ls' without taking my // right hand off the mouse (or anything else -- go ahead // and get the porn jokes out of your system now). And // since it doesn't get in the way of normal typing, // there's very little cost to it. // // I made a few changes besides the basic mirroring. // space+tab is backspace (you'll need this at first) // space+win is return (essential). // // Apparently, sometimes capital letters don't work // properly on some setups. Also, I can't find a way to // stop caps from turning on when I type an apostrophe. // // The 'include' statements should be changed to match your // original setup. Too see your original setup, type // $ xkbcomp -xkb ${DISPLAY} // and a file with name ${DISPLAY}.xkb will be created. // MAP START xkb_keymap { xkb_keycodes { include "xfree86+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete+ledscroll(group_lock)" }; xkb_symbols { include "pc(pc104)+us+group(toggle)" // Make spacebar a modifier key: key { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ ISO_Level3_Shift ] }; // Replace spacebar with windows key: key { [ space, space, Return, Return ] }; key { [ space, space, Return, Return ] }; // Various mirrored key mappings: // key { [ Escape, Escape, BackSpace, BackSpace ] }; key { [ Escape, Escape, braceleft, braceright ] }; // Tilde is replaced by backslash for TeX code; comment / uncomment as necessary: // key { [ grave, asciitilde, equal, plus ] }; key { [ grave, backslash, equal, plus ] }; // key { [ Tab, ISO_Left_Tab, braceleft, braceright ] }; key { [ Tab, ISO_Left_Tab, BackSpace, BackSpace ] }; key { [ Caps_Lock, Caps_Lock, apostrophe, quotedbl ] }; key { [ q, Q, p, P ] }; key { [ w, W, o, O ] }; key { [ e, E, i, I ] }; key { [ r, R, u, U ] }; key { [ t, T, y, Y ] }; key { [ y, Y, t, T ] }; key { [ u, U, r, R ] }; key { [ i, I, e, E ] }; key { [ o, O, w, W ] }; key { [ p, P, q, Q ] }; key { [ bracketleft, braceleft, Tab, ISO_Left_Tab ] }; key { [ bracketright, braceright, Tab, ISO_Left_Tab ] }; key { [ a, A, semicolon, colon ] }; key { [ s, S, l, L ] }; key { [ d, D, k, K ] }; key { [ f, F, j, J ] }; key { [ g, G, h, H ] }; key { [ h, H, g, G ] }; key { [ j, J, f, F ] }; key { [ k, K, d, D ] }; key { [ l, L, s, S ] }; key { [ semicolon, colon ] }; key { [ apostrophe, quotedbl, Caps_Lock, Caps_Lock ] }; key { [ z, Z, slash, question ] }; key { [ x, X, period, greater ] }; key { [ c, C, comma, less ] }; key { [ v, V, m, M ] }; key { [ b, B, n, N ] }; key { [ n, N, b, B ] }; key { [ m, M, v, V ] }; key { [ comma, less, c, C ] }; key { [ period, greater, x, X ] }; key { [ slash, question, z, Z ] }; // Some of these mappings may be nonintuitive. // You should adjust them if they are incompatible with your brainware. key { [ 1, exclam, minus, underscore ] }; key { [ 2, at, 0, parenright ] }; key { [ 3, numbersign, 9, parenleft ] }; key { [ 4, dollar, 8, asterisk ] }; key { [ 5, percent, 7, ampersand ] }; key { [ 6, asciicircum, 6, asciicircum ] }; key { [ 7, ampersand, 5, percent ] }; key { [ 8, asterisk, 4, dollar ] }; key { [ 9, parenleft, 3, numbersign ] }; key { [ 0, parenright, 2, at ] }; key { [ minus, underscore, 1, exclam ] }; key { [ equal, plus, grave, asciitilde ] }; }; xkb_geometry { include "pc(pc104)" }; };