mirrorboard2.xkb 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. //
  2. // MirrorBoard one-hand keymapping
  3. // Hacked together by Randall Munroe and neale
  4. // 2007-06-25
  5. //
  6. // This is a keymapping for occasional left-handed typing.
  7. // Run it with
  8. // xkbcomp mirrorboard.xkb $DISPLAY
  9. // (optionally, 2>/dev/null -- it prints a lot of warnings)
  10. // Skip past all this text to see/edit the actual mappings.
  11. // One-handed layouts are interesting but hard to learn.
  12. // I noticed, however, that with little effort I could
  13. // type with my left hand as if it were my right. That is,
  14. // if I take my right hand away from the keyboard and tell
  15. // my left hand to type the word 'parking', with a little
  16. // effort, 'qardevg' comes out. I'm doing the same hand
  17. // motions I'd do with both hands, but constraining them
  18. // to one hand.
  19. // I noticed that when casually switching windows with the
  20. // mouse to type responses on IRC, it was convenient when
  21. // the responses could be typed entirely with my left hand.
  22. // 'lol' cannot, but 'sweet' can. I have yet to have a
  23. // chance to say 'we fear a few dwarf watercraft
  24. // stewardesses were regarded as desegregated after a great
  25. // texas tweezer war', but boy is it weird to type.
  26. // So I realized that if I set a modifier key (caps lock)
  27. // to switch layouts such that q was p, w was o, and so
  28. // forth, I could write 'parking' with my left hand, by
  29. // typing <caps+q> <a> <r> <caps+d> <caps+i> <caps+v> <g>
  30. // The nice thing about this is that I can do it without
  31. // learning a new layout -- once I got it working, I was
  32. // able to use it right away. I find it's really handy
  33. // to be able to type things like 'ls' without taking my
  34. // right hand off the mouse (or anything else -- go ahead
  35. // and get the porn jokes out of your system now). And
  36. // since it doesn't get in the way of normal typing,
  37. // there's very little cost to it.
  38. // I made a few changes besides the basic mirroring.
  39. // caps+tilde is backspace (you'll need this at first)
  40. // caps+space is return (essential), and 'a' maps to the
  41. // apostrophe/quote key instead of semicolon/colon.
  42. // There's not room to do both.
  43. // Oh, and lastly, capital letters can't really be typed
  44. // this way. I put in the keysms, but they only work
  45. // for some of the keys. I think this is due to physical
  46. // constraints -- the keyboard can't handle all three-key
  47. // chords. But I find most casual short things I type
  48. // use only lowercase, so that's okay for me.
  49. xkb_keymap {
  50. xkb_keycodes { include "xfree86+aliases(qwerty)" };
  51. xkb_types { include "complete" };
  52. xkb_compat { include "complete" };
  53. xkb_symbols {
  54. include "pc(pc105)"
  55. // Here's the line to make capslock into the modifier key.
  56. key <CAPS> { type[Group1] = "ONE_LEVEL", symbols[Group1] = [ ISO_Level3_Shift ] };
  57. // caps-space is return
  58. key <SPCE> { [ space, space, Return ] };
  59. // If you want the keyboard to be exactly the same as your
  60. // old one when not using caps, swap the order here -- you
  61. // can decide if you want tilde or caps-tilde to be backspace.
  62. // Keeps keyboard normal, caps-tilde is backspace:
  63. key <TLDE> { [ asciitilde, grave, BackSpace ] };
  64. // Version I use -- tilde is backspace:
  65. // key <TLDE> { [ BackSpace, asciitilde, grave, asciitilde ] };
  66. // The important alpha mappings. I replaced semicolon with apostrophe
  67. // because I type the latter much more often, and there's only room for
  68. // one of them on the left side of the keyboard.
  69. key <AD01> { [ q, Q, semicolon, colon ] };
  70. key <AD02> { [ w, W, y, Y ] };
  71. key <AD03> { [ f, F, u, U ] };
  72. key <AD04> { [ p, P, l, L ] };
  73. key <AD05> { [ g, G, j, J ] };
  74. key <AD06> { [ j, J, g, G ] };
  75. key <AD07> { [ l, L, p, P ] };
  76. key <AD08> { [ u, U, f, F ] };
  77. key <AD09> { [ y, Y, w, W ] };
  78. key <AD10> { [ semicolon, colon, q, Q ] };
  79. key <AD11> { [ bracketleft, braceleft ] };
  80. key <AD12> { [ bracketright, braceright ] };
  81. key <AC01> { [ a, A, o, O ] };
  82. key <AC02> { [ r, R, i, I ] };
  83. key <AC03> { [ s, S, e, E ] };
  84. key <AC04> { [ t, T, n, N ] };
  85. key <AC05> { [ d, D, h, H ] };
  86. key <AC06> { [ h, H, d, D ] };
  87. key <AC07> { [ n, N, t, T ] };
  88. key <AC08> { [ e, e, s, S ] };
  89. key <AC09> { [ i, I, r, R ] };
  90. key <AC10> { [ semicolon, colon ] };
  91. key <AC11> { [ apostrophe, at ] };
  92. key <AB01> { [ z, Z, period, greater ] };
  93. key <AB02> { [ x, X, comma, less ] };
  94. key <AB03> { [ c, C, m, M ] };
  95. key <AB04> { [ v, V, k, K ] };
  96. key <AB05> { [ b, B, b, B ] };
  97. key <AB06> { [ k, K, v, V ] };
  98. key <AB07> { [ m, M, c, C ] };
  99. key <AB08> { [ comma, less ] };
  100. key <AB09> { [ period, greater ] };
  101. key <AB10> { [ slash, question ] };
  102. // +/- is not consistent, but there's not room on the keyboard to do it properly.
  103. // Some of these mappings may be nonintuitive.
  104. // You should adjust them if they are incompatible with your brainware.
  105. key <AE01> { [ 1, exclam, minus, plus ] };
  106. key <AE02> { [ 2, quotedbl, 0, parenleft ] };
  107. key <AE03> { [ 3, sterling, 9, parenright ] };
  108. key <AE04> { [ 4, dollar, 8, asterisk ] };
  109. key <AE05> { [ 5, percent, 7, ampersand ] };
  110. key <AE06> { [ 6, asciicircum ] };
  111. key <AE07> { [ 7, ampersand ] };
  112. key <AE08> { [ 8, asterisk ] };
  113. key <AE09> { [ 9, parenleft ] };
  114. key <AE10> { [ 0, parenright ] };
  115. key <AE11> { [ minus, underscore ] };
  116. key <AE12> { [ equal, plus ] };
  117. };
  118. xkb_geometry { include "pc(pc104)" };
  119. };