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:

into this:

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?
Zach, I can’t figure out how to activate the thing. It’s running, but nothing happens when I type. Does it require your specific script to be active? ((It doesn’t look like it, but I’m not sure.)) I’m using one which triggers on a right-click instead.
to use my script you need to have a list of words in the file C:\One_Handed_Dictionary.txt i have posted the dictionary i started with (without this file the script will do nothing)
you do not need (nor would it do anything to help) to have another script that mirrors your typing running
what you need to do is just run my dictionary_type script (and most likely for a while the add_word script as well) and then type with 1 hand as if you were hitting capslock or the mouse button
by the way i tried it with a large dictionary and found that the search part was a big performance problem
i’m not sure i explained that great, so if you are having trouble let me know
this was typed with my script so that is why there is the weird format
>_
>_< I had the dict on my desktop. I’ll try it with it in c:/i
i wasded around the house today and found that i could type with one hand
woo! it works! Yeah, the dict is a bit sparse. Now, handling punctuation shouldn’t be a big deal – the period and comma can be easily done since they’re just represented by z and x (which aren’t too common at the end of words).
i walked around the house today and found that i could type with one hand woo
it works !
So, improvements. Being able to strip the punctuation from a word then reinsert it would be good. that is, if i were to type “es!” it should strip off of the !, change the word to “is”, then pop the ! back on.
I’m not sure why, but it acts somewhat weird with some punctuation. Frex, if i end a sentence with “on.”, it thinks that I really meant “one”. No idea why, as ‘e’ isn’t associated with ‘.’ anywhere in your code that i can find.
similar to the first, if it detects a word ending with a z or an x that isn’t in the dic, it should try to remove the z/x and test the word again. If found, it can then pop a period or comma onto the word. “word.” also seems to trigger the weird replacement – it turns it into “works”.
If possible, maintaining caps would be nice.
we really need a way to turn it off with a key command. using caps lock for this would be good. Otherwise we have to go down and pause it manually to type the word ’side’. ^_^
and there is still one good reason to run another key mirror – getting access to all the numbers and symbols from the other side
Figured out the period problem – it’s just being naively fed into the regexp, which treats it like it’s supposed to, as a wildcard. You’ll want to strip that off of works beforehand.
Xanthir: Yea, I definitely need to work on the whole punctuation issue (capital letters (if i do them at all) will come later).
I liked the idea for pausing the script, so I implemented Shift+CapsLock to cause the script to pause (and doing that combo again resumes). Also, I added in “`” is backspace and CapsLock by itself is Enter. I have this updated script posted already.
My notebook has the mouse tablet thingie within easy thumbs’ reach when my hands are in typing position…I just use that. The click-button I have to stretch for, but oh well.
There are other solutions to the hand-moving-from-keyboard-to-mouse problem. Google on the words “foot” and “mouse” and you’ll see that there are a few different models of foot-controlled pointing devices out there designed to let you keep both hands on the keyboard at all times.
I’ve been inspired to try the Dvorak layout of typing since I read this blog! Perhaps I have too much time on my hands this summer :D
This mirror keyboard is awesome. It would also be helpful for people that use CAD programs such as AutoCAD, Rhino 3D or any other program that has a prompt. When I was first learning CAD my teacher always said “Left hand on the keyboard, right hand on the mouse”
sad we extracted vast wet deer ears as we traded red tree sewers at great casted rear freezers
I now included capabilities for using “,” and “.” in the my dictionary_type program, also words that are capitalized in the dictionary now appear capitalized when you type them, though I have not yet gotten words that follow periods to capitalize.
Not cool… I just hurt my left pinky today :( (It’s tough with a band-aid on it)
I too am a worshiper of AHK. It’s slightly saddening that Randall didn’t recommend it himself.
For those interested, learning Dvorak feels like a major reprogramming of the brain. Once profficient, I loved it until I too realized I can’t program in it. Now my home PC is Dvorak and my work pc is qwerty (which I couldn’t remember how to spell for a moment… *sigh*).
I do LOVE when people sit at my computer and get really confused at their inability to type. Whether people want to admit it or not, this is the coolest part about Dvorak.
To get shif functionality, do this:
Capslock & +q::Send {Blind} p
There must NOT be a space between the + and q or it interprets the + as the plus character.
Now for a bit of practice :)
Oddly, this does not work with the left parenthesis (… but worked for the rest of the shift+number characters.
Also doesn’t work for shift-enter… But I mostly use that in IM anyways.
You can get a ? in the script by doing shift-capslock-` too.
I can’t get shift-capslock-2 to do anything o_O (even if i set it to “w” or something)
Gertlex: I have the same issue with the shift-capslock-2 (and i also found that shift-capslock-s has the same problem) with my mirrorboard ahk script (which uses capslock), however when i switch to use the middle mouse button instead (my mirrorboard_with_mouse ahk script) these issues don’t exist – not quite sure why.
I have completed adding in proper use of capital letters (if word in dictionary uses a capital letter or if first word in a new sentence). This is in my site under the folder check_dictionary_typing.
One idea to get around the lack of an L is to do a hotstring:
:c*?:lS::L
I’ve yet to try the dictionary stuff though.
Gertlex: I just “finished” a dictionary thing with ahk, so you can check out my code/ask me for some suggestions (1 thing that is the biggest problem with mine is the small dictionary (though I do have an add-word script so that does solve some of that issue) and lack of quotes and parentheses)
Ya, I’ve downloaded that… Though due to the aforementioned pinkie, I’ve yet to use this stuff at all, just experiment with it :)
And though I worship AHK, I haven’t delved deeply into scripting with the language. My debugging might be nonexistent.
Nevermind my afforementioned idea of shift-caps-` for ?… That overrides the backspace functionality.
Also, it looks like the shift-caps problem occurs for the entire “column” of 2, w, s, x…. o_O
This is wonderful!! I’m totally one of those “I could pick up my hand to move the cursor to that text box… or I could just tab for 5 minutes until I find it!” kid of girls. I almost peed myself when I was told about alt – tab. But this is WAY better. Now I won’t have to take my hand off the mouse at all!
Nitpick: In the paragraph following the second image, for consistency, “” should instead read “”.
Fucking angle brackets!
“caps+i” should instead read “caps+e”
hey Zach–I’m really impressed with what you’ve done on the mirrorboard, its been working great for me, but a ‘lil slow. I figure that the dictionary lookup would be faster, but I’m not really sure how your app works and I was wondering if you can put up a readme explaining it? thanks
When trying to implement this on scandinavian keyboards I ran into some problems. There aren’t enough keys on the left side of the keyboard to map “Ã… Ä Ö” without shifting the entire setup one key to the right, which means I have to move my hand around a lot, an activity of which I am not a huge fan. This also makes the whole “right hand movements” obsolete, since the keys are not in the same place. Argh!
Scandinavian keyboards have the Ã… mapped to [ (which is moved to Right Alt+8), Ö mapped to ; (which is moved to shift+,) and Ä is found at ‘.
Scandinavian keyboards have reduced the size of the return key to allow for the placing of another key, located to the right of the QWERTY ‘ . Thus scandinavian keyboards are effectively 105-key keyboards which makes these innovations a little… hard to implement.
Damn it all. I’ll just wait for some decent voice-recognition instead…
I’ve got one of the Matias hardware ones, because occassionally I get tendon issues in my right arm; firstly, the disadvantage:
It’s practically impossible to type a decent password on the thing :)
The advantage is that it works in every OS, and in Linux without X.
The reason why you have problems with shift+caps+z, and other 3 key combinations is because it’s difficult to engineer a keyboard that can uniquely detect all possible key combinations. So they make all 2 key ones work, and most 3 key ones that use 2 modifiers, then leave the rest to luck. The really high quality keyboards sometimes reach for higher combo counts. This applies to all kinds of keyboards, AFAIK. Which key combos are affected varies from one keyboard to another. The only workaround is to try different key combos instead.
Hey, wait… where is the “Alt Gr” key ?
Robert: no problem I can post a readme as to how it works/where I think others can most likely improve upon it in case anyone is so inclined. This should be posted by the end of today.
This setting shall forever be known as “FAPS LOCK”.
I have just posted the readme file for the dictionary project to my site.
great–thanks a lot
I like your idea – if only I were better a typing this way…
I found a bug though: the left-handed capital L does not work when using the left shift key.
Another point: Why do you guys need the mouse so badly? What happened to and ? E.g. when I’m done typing this, am I gonna click on “submit comment”? No, I’m gonna press and then . At times (surfing, image manip) I also use the mouse a lot, I just don’t see the need for switching so much.
I didn’t read carefully enough to see if someone had already mentioned this but why not make the toggle key a button (thumb?) on the mouse?
If you change the xkb_keycodes bit to read like so:
xkb_keycodes {
include “xfree86+aliases(qwerty)”
// Swap LCTL and CAPS
= 66;
= 37;
};
you get swapped left control and caps keys. Great if you use emacs a lot.
(Note to self: remember HTML entities)
If you change the xkb_keycodes bit to read like so:
xkb_keycodes {
include “xfree86+aliases(qwerty)”
// Swap LCTL and CAPS
<LCTL> = 66;
<CAPS> = 37;
};
you get swapped left control and caps keys. Great if you use emacs a lot.
Dave`s beard served as a face sweater
For some reason, I cannot wrap my mind around using caps lock… o_O
I must constantly think what key I should be pressing if I want to write a key on the right side of the keyboard. Just typing one-handed with an ordinary keyboard layout is a lot faster. It might have something to do with me being left-handed.
Too bad i’m left handed and use my left hand for the mouse. Is there any way to get it work the other way round? Using the right side of the keyboard and caps for switching to left side?
[...] 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. [...]
For everyone asking why you need one hand on the mouse… this can work for the right hand doing anything, not just mousing. I really wish I had found this while in college. I’m pretty decent at doing two things at once, and I often wished that I could type one handed while doing homework with my right hand. Actually, I did do it, but I was a little slow at typing on a whole keyboard with my left hand. There were also a few times where dinner and homework time overlapped, and having a free hand for eating would also have been nice.
I have found a autohotkey script that someone has made that does the exact same thing, only it uses space instead:
http://www.autohotkey.com/forum/topic1326.html
Cute Idea! Only I’m a Dvorak user (can type Qwerty as fast as ever, but I need to see the keys). The other problem is that I’ve ripped all the keys off of the keyboard that I don’t like, including capslock. Still, nice job!
Poop a puppy pie, Jake; pay a pope, poke a papaya, equip a peppy oak axe. Puke, you peaky ape, you! I joke, Jake, you yappy pixie; I joke.
I still get that annoying error from before. Still can’t figure it out.
And I could use a QWERTZ version of this, anyway. Is that a simple modification? I tried taking a look at the file itself, but it’s all Greek to me.
I can’t seem to find the Firefox dictionary, but I have a 54,000+ word dictionary (wordlist), with word frequencies. It is downloadable by the click of my name.