Mirrorboard: A one-handed keyboard layout for the lazy

Do you have a wearable computer? Are you interested in alternate keyboard layouts but too lazy to learn Dvorak? Do you masturbate at your desk? If you answered yes to any of these questions, you may be interested in my custom keyboard layout.

I spend most of my desktop time in a web browser and the rest in terminals/messengers. So, like a gamer, I’m usually sitting with one hand on the keyboard and the other on the mouse, typing things occasionally. I found that I was actually biasing myself towards things I could type with my left hand — saying “haha” instead of “lol”, for example. This got me thinking about one-handed keyboard layouts.

Now, there exist all sorts of specially-built one-handed chording keyboards. There are also one-handed layouts like Left-handed Dvorak which can be used with a standard keyboard. That’s no good for me. I’m not going to spend months rewiring my brain just to type a few things faster (Dvorak people, I admire your perseverance, but I do not have the commitment that you do). What I really wanted was a modification of QWERTY that let me occasionally type with one hand without learning anything really new.

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.

When caps-lock is pressed, the layout turns from this:

QWERTY layout

into this:

Mirrorboard layout

This means that to type “parking”, you press <caps+q> <a> <r> <caps+d> <caps+i> <caps+v> <g>. The nice thing about this is that you can start typing at a decent speed right away, and it doesn’t interfere with normal typing — there’s no need to switch back and forth like with dvorak. It’s just an additional set of shortcuts to get to letters on the right side of the keyboard. You can use it as much or as little as you want. I don’t use it for too much of my typing, but I use it enough that I miss it when it isn’t there.

Here’s the layout file:

http://xkcd.com/mirrorboard.xkb

Activate it by running

xkbcomp mirrorboard.xkb $DISPLAY 2>/dev/null

You can stick that in a startup file somewhere to run automatically on boot.

This is a mapping for X, so it works on Linux and probably some sort of Unix machines. I use it on my Ubuntu desktop and the Gentoo server in the living room. I don’t have a version of this for any other OS, but if anyone creates one I’ll stick it up here. (edit: Pat points out that the concept of a mirrorable one-handed keyboard has been explored before, at least on the hardware side.)

Thank you to Neale for his help in putting the file together.

Notes:

(1) I recommend remapping the tilde key, without caps-lock, to backspace. I didn’t make the change in the published file because I want it to make no changes if you don’t use caps-lock. To make this change, just switch which line is commented in the file where it talks about “tilde is backspace” (or download the alternate version where I made this change).

(2) Caps-space is mapped to return. This is incredibly handy and is probably the aspect of the layout I use the most.

(3) I had to be a little inconsistent with the number keys, but for the most part I only use this layout to type letters anyway. You can adjust them pretty easily in the file.

(4) This would become orders of magnitude faster if intelligent-guess methods were used so you could stop worrying about caps lock. For starters, I bet someone could easily write a line or two of perl that took an input word, such as “qardevg”, and searched the dictionary for /^[qp][a'][ru][dk][ei][vn][gh]$/. I bet most of the time this would only turn up one word (xkcd@aram:~$ cat words | grep -i “^[qp][a'][ru][dk][ei][vn][gh]$” turns up “parking”). With a lot more work, you could build the same idea into a layer that sits in X somewhere and is activated when you hit a key (caps lock or scroll lock, perhaps). As long as it added to its dictionary based on what you’d typed previously, this could become a pretty powerful system for one-handed typing, with possible applications for wearable computers and accessibility for the recently-disabled.

(5) Just for fun, try typing “We fear a few dwarf watercraft stewardesses were regarded as desegregated after a great Texas tweezer war.” on a QWERTY keyboard. Also try “I’ll kill him in Honolulu, you unhook my pink kimono.” Can anyone come up with better ones?

220 Responses to “Mirrorboard: A one-handed keyboard layout for the lazy”

  1. cthuljew says:

    Here’s my version of the US Dvorak one-handed board. Still need two hands for hyphens and brackets, but the letters work fine.

    http://www.sacredchao.net/~cthuljew/mirrorboarddvorak.xkb

    To note, all I did was change around what letters/symbols were where in the file. None of the functional parts were changed at all because I have no idea how they work.

  2. james says:

    jerith: so instead of being restricted to X, we get restricted to Linux? That’s a much better.

  3. Kyzentun says:

    james: I think what jerith meant as the advantage of not being restricted to X is that it also works for VTs, for whenever you need to use a VT (I have some uses, including a machine that doesn’t have X, I’m sure the rest of you have the occasional use for VTs as well)

  4. [...] was created by xkcd creator Randall Munroe, and enables one-handed typing; it’s called the Mirrorboard, and can be installed on Linux machines only (that’s not me, so I can’t vouch for it, [...]

  5. Craig says:

    I’m lazy enough to want to keep my hand on the mouse most of the time, but can type pretty well across the keyboard with one hand… I always thought tho if the mouse had three extra buttons (that acted like shift, enter and backspace) that would minimise the distance my poor left hand had to move to post stuff quickly :)

  6. Kathryn says:

    The mirror board is an interesting layout, certainly one that saves on learning time. I agree with other posts here, spacebar would be a better choice for a modifier key and it is what most hardware one-handed keyboards use. I think for the most part if I was doing anything that required fast typing, I’d probably just put both hands down on the keyboard.

    The Dvorak one-handed layouts are easier to use for people who use the two-handed layouts (the layout is very similar), and the left and right versions are basically mirror copies of each other except for a few characters. In terms of the two handed layouts, there actually isn’t that much difference between Dvorak and Qwerty in terms of time, it’s more to do with how far your fingers have to move across the keyboard. (See http://www.cs.waikato.ac.nz/~kah18/files/KeyboardDebate.pdf ) So perhaps we can say the mirrorboard will be as fast as the Dvorak one-handed layouts, but tires your fingers a little more.

  7. james says:

    Kyzentum: yes, i did get that, but still, more Unix and Unix-like desktop users run X than run Linux. I mean I could probably get something working with wscons too but that would have less application than doing it with X.

  8. Heiner says:

    I edited that for a German QWERTZ keyboard, redefining only the left half of it and using that otherwise useless LWIN (= Microsoft Logo, or Tux in my case) key instead of CAPS.
    Also, that version should be used by copying the file to /usr/share/X11/xkb/symbols and setting `mirrorboard’ as a symbol with setxkbmap.

    Example: $ setxkbmap -v 10 -model acer_tm_800 -layout de -variant nodeadkeys -symbols “pc(pc105)+de(nodeadkeys)+inet(acer_tm_800)+altwin(alt_super_win)+mirrorboard”

    There may be better places to put that file, I don’t know.

    http://www.math.tu-dresden.de/~kuettler/mirrorboard

  9. Helio says:

    It’s great, but it has a small problem when typing in Spanish and you need a orthographic accent (á, é, í, ó and ú) and I don’t seem to find both questionmarks (¿ and ?).

    I’m talking about Zach’s program.

  10. Jenny says:

    zach, three ideas. one, you oughtta have it source the text document in the same folder as the main program, so for instance, if you put the program in c:/folder/, the text document should also be put there. this is easily possible, but i dont remember exactly how. if you dont know, ill try and find it. second, if you could add a key combo like alt+space to skip to the next possibility in the dictionary. so for example, when you type “cww” now, it types “cow,” but if you pressed alt+space, it would change to “moo,” which uses the same letters. finally, you should rather than making it all lower case unless after a period in which case capitalize the first letter, it should retain the case that the word was typed in.

  11. Tony says:

    Awesome.

    If someone could post a way to do this in windows,
    (I don’t remember reading about a link above)
    I’d love to give it a try.

    So I can hold a book or coffee while typing,
    if nothing else at all.

  12. Julia says:

    Cool! How about a left-handed one?

  13. Jenny says:

    Julia, this is designed only for a left handed one, and the link for zach’s site is http://cec.wustl.edu/~zgf1

    zach, i thought of how to make it work for right handed work to. first convert all right side letters into left side letters then convert the left side letters into the possible combinations. also, the variable for current directory is A_ScriptDir it comes without a slash after it of course, so you need to add that. i tried allowing for people to choose the second or third entry in the dictionary, but found too much difficulty

  14. Zach says:

    Jenny: 1. The current directory thing for the dictionary isn’t a bad idea, perhaps I’ll make that change this weekend (or if i can find time before then)

    2. The choice of dictionary entries is definitely a problem, I tried working out the kinks in that when I was first creating the script but found it a tad difficult (again maybe I will look at it when I have time this weekend).

    3. The capitalization is actually a self correcting capitalization, by which I mean it works after periods and if the word is capitalized in the dictionary. I found that much easier than keeping track of which letters were capitals and which weren’t. Of course this isn’t optimal for casual conversation it works great for people like me who don’t hit shift enough when writing a paper.

    Any other suggestions would be great. I’ll take a look at this comment list again before I start “work”

  15. Zach says:

    haha and I screwed up my website on the previous post (so doesn’t really matter but click on this one if you want to go to my site)

  16. Nick says:

    Better option in my opinion:

    Test out Dasher. It’s, without doubt, the best mouse-input text-entry system I’ve ever come across. The group developing it is also working with some cool optical-entry schemes and the like. After a short learning curve (it only took me, oh, 5-10 minutes to get to fluent text entry at its highest speed), you can really get going on it.

    http://www.inference.phy.cam.ac.uk/dasher/

  17. Jenny says:

    Actually, Zach, I just thought that you ought to only make it capitalize proper nouns. Any time people want to have capital letters after periods, they will probably use a program which will fix that for them. It is probably more worthwhile to leave the capitalization the same.

    Btw, I typed this with Dasher. It is a very interesting idea, and is enjoyable to try at least once, but it is probably not worth it to type like this all the time. As you can assume, I have found it to be a bit slow. Also, it opens in a new window, so you have to click on copy all, switch to the window you want to type in, and click paste to actually enter the text. I have only just started, so I am not very fast yet, but this is my preliminary evaluation.

  18. lesliesage says:

    I’ve a friend with only one hand. She’s amazingly fast on a normal keyboard, but I always thought your plan would work better.

  19. Vincent says:

    I wanted to test this fantastic script with my french azerty keyboard, so I modified it in order to make it work ! There are probably some mistakes, but all mappings are fine ! Thanks XKCD for this idea !

  20. Kuzutetsu says:

    Yet another mirrorboard

    Here is a little modification of XKCD’s mirrorboard, for french azerty keyboards. It works pretty well, except for the cedilla, which I could not map (bad code or something)… By the way I think it can greatly be improved….

  21. Anglave says:

    I was immediately captivated by the OP. Saddened that it would not work on Windows, I even considered installing a Linux distro so that I could try it.

    Thank you to everyone who helped (is helping) make this happen. Especially Zach. You are a wizzard, and you’ve made my wish for today come true.

    I was just starting to read through all of these posts when I thought to myself “Wow, using ‘MOUSE3′ as the modifier key would be tons better than using any of the keys on the keyboard.” And I see that you’ve anticipated that wish as well.

    And you’ve made serious progress towards a usable adaptive dictionary too. I’m impressed. I was even going to complain about (Zach’s) mirrorboard not maintaining the capitalization state of the letters that I’m typing (as I am a compulsive capitalizer) but It Seems To Be Doing That As Well. (Yes, I’m typing this using his script. Slow but easier than constant hand-swapping).

    Incidentally, does anyone know the (English) word for “Capitalization State”?

    Thanks

  22. coke_rocks says:

    #!/usr/bin/perl -w
    use strict;my(%r,$q);local$/;for(split(/\n/,)){$q=$_;tr/poiuyt`lkjhg.,mnb/qwertasdfgzxcv/;(defined$_{$_})&&($r{$q}=1);$_{$_}=1;}print join(”\n”,keys%r).”\n”;
    This answers the question “what words are ambiguous with regard to the caps-lock key”. 166 characters; can anyone do better? Run it like “./foo.pl

  23. Gigs says:

    The blackberry Pearl uses just such a predictive system to “overload” qwerty onto half as many keys without anything like shift or double tapping to get at the alternate letters.

    It’s surprisingly easy to get used to.

  24. Mad says:

    Thanks Zach! You are wonderful! This is incredibly useful

  25. Fal says:

    I made a finnish edition of this ;)

    If there are any finns wanting to try it out, keep some noise here and I’ll publish it somewhere so you can get it :) It’s almost suitable for swedes too. Just need to find a good place for Ã¥ :|

  26. Possum says:

    Sorry to reply to such an old comment, but…

    Is it possible to make it so that instead of pressing Caps + Key you press Caps then key?

    If you change the line that sets CAPS to be the modifier key, look for the part that says “ISO_Level3_Shift” and change it to “ISO_Level3_Latch” (without quotes of course).

    And thanks cthuljew; some of us two-handed dvorak users are lazy too ^-^;;

  27. Possum says:

    If you change the line that sets CAPS to be the modifier key, look for the part that says “ISO_Level3_Shift” and change it to “ISO_Level3_Latch” (without quotes of course).

    Oh, there are also two interesting/fun side effects to this.

    For one, you can hold CAPS and type, just as if it were set like the original version.

    Also, pressing CAPS twice will lock the keyboard in it’s mirrored position, then just press CAPS twice again to unlock it.

  28. Xyzzy says:

    Very clever one-handed keybinding. I’d almost certainly give it a dry-run if it wasn’t for HJKL (my brain is so hopelessly vi-hardwired that if I need a DOC file for some reason, I write it in html with vi and import it).

    Sorry to nitpick, but EWWWW, not in front of the children:
    cat file | grep regex
    I think you’d set a more morally upright example with:
    grep regex

  29. Xyzzy says:

    Doh, post truncated after the less than. You get the idea (that I’m an old unix idiot)

    (In any event) Thanks (for demonstrating that an understanding of humor requires (at least a fundamental) understanding of LISP),
    Bob

  30. Wolvan says:

    If someone could help me, it would be awesome. I downloaded Superdotman’s mirrorboard for OS X in hopes that I could modify the key bindings in it, but it just has me flustered.

    I don’t need mirrorboard functionality, what I do need is to change the “clear” and “.” button on the numpad to “delete forward” and “,” functions – and that’s it.

    If anyone could help me out it would be greatly appreciated.

  31. Veovis says:

    I have used Autohotkey for over 2 years and there have been countless scripts posted that can do this (as people before have mentioned.

    @Wolvan:
    if you are on linux just use a xkb
    on windows, download autohotkey. the code would be something like this (if i understand you correctly)
    numpadclear::delete
    .::,

  32. Zach says:

    I am not sure if anyone will check this since it has been a while, but I finally had time to improve the dictionary check for typing so that if you want to move on to the next word in the dictionary that matches your input you can hit any “whitespace” key (space, tab, return, etc…) to do this, otherwise just keep typing. As for the other changes, I have not modified where the dictionary needs to be, if anyone really wants that and cannot modify it on their own I can do this modification.

    I have just posted it to my website, if anyone wants it. Any other questions, let me know.

  33. Martin says:

    For Linux users who are interested in the software solution of deciphering which word was entered on an indeterminate keyboard, there is also uim, the Universal Input Method.

    Originally developed for the input of Japanese, it has been expanded as a general input method framework that can implement many types of problems.

    The problem of the mirrorboard is actually similar to Japanese input, where multiple words are written the same phonetically (homophones). Effectively, an input string may represent several different words. An input method solves this by offering a drop down window with various possibilities when ambiguities arise.

    Thos interested in the software solution would do well to have a look at this: http://code.google.com/p/uim/

  34. Paul says:

    I’m late to the party, but my solution is somewhat the opposite. I barely use the mouse. learn the keyboard shortcuts in your programs and you won’t have to move your hands off the keyboard very often. for web pages, space bar to scroll down, or the arrows, or page down/up… tab to highlight links, enter to activate (unless there’s a zillion of them, in which case the mouse is easier). in most Windows programs, hold alt and the key letters of your menus will highlight. etc. as I transitioned from DOS to Windows back in the day, the keyboard was still more natural for navigation for me, and I still use it whenever it’s a viable option.

  35. Zach says:

    I have just updated the files on my site: http://cec.wustl.edu/~zgf1/check%20dictionary%20typing/ This update includes a bug fix for the z -> . and x -> , mapping (though it has the minor drawback at the moment that if your word actually ends in a z or x it won’t find the word). I also added in functionality for mapping the right half the keyboard as well (so now you can choose to use either your left of right hand).

    I’d like to thank Jenny for these suggestions.

  36. cspot says:

    heres my autohotkey script that does the “mirror” on scancode level so it works for different layouts. It also mirrors the number keys:

    ;#NoTrayIcon

    ; ———————————-
    ; capslock (SC3A) “mirror”
    ; ———————————-

    SC3A & Space:: Send {Enter}

    ; tilde backspace
    SC3A & SC29:: Send {SC0E}

    ; qwert
    SC3A & SC10:: Send {SC19}
    SC3A & SC11:: Send {SC18}
    SC3A & SC12:: Send {SC17}
    SC3A & SC13:: Send {SC16}
    SC3A & SC14:: Send {SC15}

    ; asdfg
    SC3A & SC1E:: Send {SC27}
    SC3A & SC1F:: Send {SC26}
    SC3A & SC20:: Send {SC25}
    SC3A & SC21:: Send {SC24}
    SC3A & SC22:: Send {SC23}

    ; zxcvb
    SC3A & SC2C:: Send {SC35}
    SC3A & SC2D:: Send {SC34}
    SC3A & SC2E:: Send {SC33}
    SC3A & SC2F:: Send {SC32}
    SC3A & SC30:: Send {SC31}

    ; 12345
    SC3A & SC02:: Send {SC0B}
    SC3A & SC03:: Send {SC0A}
    SC3A & SC04:: Send {SC09}
    SC3A & SC05:: Send {SC08}
    SC3A & SC06:: Send {SC07}

    ; disable capslock
    SC3A ::

  37. cspot says:

    addition: replace any Send with Send {Blind} to enable upper case typing .. ;-)

  38. William says:

    don’t you see…*this* is why everyone should use the clit mouse!

  39. MattJ says:

    I made an English/British layout version of the original mirrorkeyboard.xkb, find it at http://matthewwild.co.uk/hacks/mirrorkeyboard_gb.xkb

    Unlike the original this will not transform @ into “, remove the all-important £ sign, and other oddities.

    the kittev uarked uhe hivercraft <– Without using backspace :)

  40. EMDF says:

    I’m honestly surprised no one has mentioned this before, so I’m going to mention it now.

    For the whole entire “intelligent-guess method” you propose, it would have to spell check as well. Not only would this slow it down a bit, but it would also give more results. There are some words (none I can think of off the top of my head) that if misspelled, come out differently than if spelled correctly, using the “intelligent-guess method.”

    I guess what I’m trying to say is that if you type in “frg”, it can come out as “jug”, when the intended word was “fog” (the “o” in this case was accidentally replaced with a “u”.) I hope that I can prevent someone that wants to avidly code this from forgetting this simple error that can yield horrible results.

    What I would like to see, however, is a program that can sense if someone constantly misspells something (like how I misspell “surprise” as “suprise”, “forward” as “foward”, etc.), it could detect it and then learn that this person constantly misspells this word, and to replace it if the surrounding words are in correct context. For instance, using my previous example, saying “There is a lot of jug there is a lot of jug wrt tgere”, would check if the word “jug” might have been misspelled, as it is grammatically incorrect (”a lot of jugs” is, but “a lot of jug” is not). Once it did this, it would then realize that you meant fog, correct it, and be on it’s merry little way.

    I can’t help but think that this might yield disaterous results, as there must be some case where it thinks you meant some word that was wrong, but fit in the context of the sentence. No examples come out of my train of thought at the current moment, however. In this case, There could be something that popped up saying “you input this wrong, please try again”, and kept asking you if you kept inputting it wrong.

    I hope you get the gist of what my rant, and figure out that if not fixed (in advance, since you haven’t started working on it), it could be dangerous..

  41. bryson says:

    I am new to Ubuntu and Linux. I am trying to stop using Micro$oft. Right now I am running Ubuntu on Virtual PC 2007. I can’t get the mirror keyboard files to work. Is it because Windows Vista is on the exterior and Linux is having to work through it to get keyboard commands? or am I just a really crappy user?

  42. Jamie says:

    You can find more information about Patent #5288158 at http://www.wikipatents.com/5288158.html. I recommend adding http://www.wikipatents.com to your page. WikiPatents has the largest database of patents open for public comment on the internet, allows PDF downloading of patents, free patent translation into multiple languages, and additional information and resources. It is the best free patent site on the web.

    Have a nice day,

    Jamie

  43. Shakoor says:

    I’m with QuadTri Technologies http://www.quadtritech.com. We have developed a right handed version of a one handed keyboard using the QWERTY Layout. The home row is shifted to start with FGHJ as opposed to JKL:. We plan to have a left handed version with a home row of ASDF so that there is no learning curve. The space bar is the large blank key where your thumb goes. The keys in the center are full size and concave. The smaller keys are convex. The way it works is you line your fingers up on the home row and thumb on the space bar and reach for the other keys. It is only 6.1×3.2 inches and fits in your shirt pocket.

  44. Billyware says:

    I just slide my hand to the right to hit the letters that aren?t on the left side of the keyboard. Call me crazy.

  45. [...] of internet time killers. So, when browsing the xkcd blag I came across the idea of using just one hand on the keyboard, but still typing efficiently — sort of. I didn’t like the idea of having to [...]

  46. disable windows media center in vista…

  47. sapincher says:

    This would be so very much better if I didn’t have caps lock ripped off of every keyboard I use.

Leave a Reply