Dvorak Mirrorboard layout (Based on Randall Munroe’s Mirrorboard)

Update: New version of the layout can be found here; it has a number of improvements and visuals. History & Rationale remain in this post, though, along with installation instructions.


Now playing: Shia LaBeouf by Rob Cantor.

It all started when I was looking into options for one-hand typing, simply because it seemed like a pretty interesting thing to learn. (I love the feeling of the brain rewiring, haha.)

I stumbled upon this blog post by Randall Munroe about his Mirrorboard layout.

The key moment was when I realized that the brain command I use to type the letter ‘e’ is very similar to the one I use to type ‘i’. I found that if I held my right hand away from the keyboard and tried to type “the kitten parked the hovercraft”, it came out “tge dettev qarded gte gwvercraft” — I was doing the same motions with my left hand that I’d normally do with my right.

Mirrorboard is a keyboard layout that lets you type simple things on a QWERTY keyboard with only the left hand. It works by mirroring the layout between the left and right hands when you press caps lock. “asdf” becomes “;lkj” — the entire keyboard is reflected. To press a key on the right side of the board, you hold caps-lock with your pinky and then press the corresponding key on the left side.

Which is actually really fascinating and true.

After Googling around, I did not find any Dvorak version of the keyboard layout, so I decided to make one. Learning quite a lot about xkb and Linux’s handling of keystrokes in the process.

Another reason to change it a bit was because I use a pretty complex keyboard setup, with dvorak+Russian+Ukrainian, a compose key, and multiple remapped keys on my keyboard, and I wanted to integrate left-hand typing seamlessly in my workflow.

Changes made from the original Mirrorboard layout:

  1. Made it Dvorak-friendly
  2. Left-alt is used as modifier key, instead of Caps. (Which is remapped as Ctrl on my keyboard).
  3. Return is Modifier+Tilde
  4. Modifier+Tab is “/”
  5. Modifier key is a Latch-style key instead of Shift-style key. (Basically, the difference between the two is that Shift-style keys work only when pressed together with the key that’s being modified, while Latch-style keys may be pressed before the key, or at the same time, or twice to “Lock” it until the next time you press it; Here’s an excellent explanation)
  6. Adapted it to contain only the modified keys, so it can be put in /usr/share/X11/xkb/symbols/our_dvorak_mapping and later used as just another keyboard layout, say,  setxkbmap -option 'grp:rshift_toggle, compose:rctrl' dvorak,sh-mirror3,ru,ua (right shift to change keyboard layout, right Ctrl as compose key)
  7. Maybe some other things I have forgotten

Additional resources that helped me in the process have been this excellent post on how to create your own layouts and the legendary Arch linux wiki.

The layout is on Github.

To use:

  1. Fit it to your needs
  2. Copy to your key definitions folder (usually /usr/share/X11/xkb/symbols/)
  3. Either just setxkbmap sh-mirror3 or integrate it in whatever you are using (e.g. setxkbmap -option 'grp:rshift_toggle, compose:rctrl' dvorak,sh-mirror3,ru,ua)
  4. In case you want to edit it, copy it every time to a new name. The layout gets cached to the DE, and for it to read the new changes you would have to reload X, unless it’s a new file. (That’s why sh-mirror3; same number of tries as it took this person I learned this fact from). Or just during editing do xkbcomp mirrorboard.xkb $DISPLAY 2>/dev/null as recommended in the original post, maybe removing the last part to see any errors.

Then I did a couple of changes to my i3, cvim and keynav configs, to make them easier to use with just the left hand.

keynavrc

Keynav is an excellent little program to avoid using the mouse. I divide the screen in 16 areas, and decided to move the lower ones to my left hand, used with shift. Relevant fragment is:

On my keynav 0.20170124.0 the areas seem to be numbered vertically, not horizontally as mentioned on the page linked above.

cvim

Cvim is my favourite extension that adds vim-like keybindings to Chrome.

I added a keystroke to change the hint characters to left-hand ones and back, which conveniently was exactly the example given by the author for JavaScript mode:

All of this is definitely a work in progress, but it was really interesting.

Current left-hand typing speed is 12WPM, compared to my usual 80, I wanna see how and if it will improve. It’s really not about actual use, but because it seems something cool to do. Something like shorthand-writing, which I’ve almost learned. I wonder what comes next. Dozenal counting, perhaps?

2 thoughts on “Dvorak Mirrorboard layout (Based on Randall Munroe’s Mirrorboard)

Leave a Reply

Your email address will not be published. Required fields are marked *