// // 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 see/edit the actual mappings. // 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 (caps lock) // 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. // caps+tilde is backspace (you'll need this at first) // caps+space is return (essential), and 'a' maps to the // apostrophe/quote key instead of semicolon/colon. // There's not room to do both. // Oh, and lastly, capital letters can't really be typed // this way. I put in the keysms, but they only work // for some of the keys. I think this is due to physical // constraints -- the keyboard can't handle all three-key // chords. But I find most casual short things I type // use only lowercase, so that's okay for me. xkb_keymap { xkb_keycodes { include "xfree86+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; xkb_symbols { include "pc(pc105)" // Here's the line to make capslock into the modifier key. key { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ ISO_Level3_Shift ] }; // caps-space is return key { [ space, space, Return ] }; // If you want the keyboard to be exactly the same as your // old one when not using caps, swap the order here -- you // can decide if you want tilde or caps-tilde to be backspace. // Keeps keyboard normal, caps-tilde is backspace: key { [ asciitilde, grave, BackSpace ] }; // Version I use -- tilde is backspace: // key { [ BackSpace, asciitilde, grave, asciitilde ] }; // The important alpha mappings. I replaced semicolon with apostrophe // because I type the latter much more often, and there's only room for // one of them on the left side of the keyboard. 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 ] }; key { [ bracketright, braceright ] }; key { [ a, A, apostrophe, quotedbl ] }; 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 ] }; key { [ z, Z, period, greater ] }; key { [ x, X, comma, less ] }; key { [ c, C, m, M ] }; key { [ v, V, n, N ] }; key { [ b, B, b, B ] }; key { [ n, N, v, V ] }; key { [ m, M, c, C ] }; key { [ comma, less ] }; key { [ period, greater ] }; key { [ slash, question ] }; // +/- is not consistent, but there's not room on the keyboard to do it properly. // Some of these mappings may be nonintuitive. // You should adjust them if they are incompatible with your brainware. key { [ 1, exclam, minus, plus ] }; key { [ 2, at, 0, parenleft ] }; key { [ 3, numbersign, 9, parenright ] }; key { [ 4, dollar, 8, asterisk ] }; key { [ 5, percent, 7, ampersand ] }; key { [ 6, asciicircum ] }; key { [ 7, ampersand ] }; key { [ 8, asterisk ] }; key { [ 9, parenleft ] }; key { [ 0, parenright ] }; key { [ minus, underscore ] }; key { [ equal, plus ] }; }; xkb_geometry { include "pc(pc104)" }; };