Adapting The Linux Keyboard For One Hand
Using a standard keyboard, the one-handed typist must move from side to side to cover all the keys. Ideally, this typist should keep his (good) hand on fghj, a new “home” position in the center of the board, but he will inevitably be forced to leave the home keys or stretch like a concert pianist to reach all the letters. Capital letters definitely require a time-consuming excursion to one side or the other. This reduces efficiency and frustrates the typist.
You can purchase a special keyboard from FrogPad.com, that plugs into the USB port of any computer. Some people prefer this to the software “fixes” described below. Others would rather adapt the existing computer, as is, so they don’t have to buy a special keyboard for every box they come in contact with. Here are a couple of ideas.
Virtually every computer has a dvorak configuration built in – you only need to know how to turn it on. This may include dvorak for the left or right hand. Under Linux, the files may be in:
/lib/kbd/keymaps/i386/dvorak/
There is a file for two hands, a file for the left hand, and a file for the right hand. As you can see, these are compressed. Uncompress them with gunzip, and apply them with loadkeys. (You must be root to do the latter.)
Other distributions place the files in:
/usr/lib/kbd/keytables/dvorak*.map
These files are not compressed.
To switch back and forth between the two keyboards, using the same keystrokes, place the following aliases in your .bashrc file.
alias asdf "loadkeys /usr/lib/kbd/keytables/dvorak.map
alias aoeu "loadkeys /usr/lib/kbd/keytables/us.map
Another approach is to have the space bar, or some other control key, reflect the keyboard through the gh midline. Thus asdf becomes ;lkj when the space bar is depressed. All this can be done via loadkeys, a Linux keyboard rearrangement utility, quite easily. However, if you want the space bar, by itself, to enter a space, loadkeys cannot accomplish this. You can download a keyboard reversing kernel module here. Within X, you can use this config file. This approach is minimally invasive, in that a two handed person can step up to the computer and type normally, completely unaware of the change. Yet the one-handed typist, who knows about the secret space bar chords, can access the entire keyboard from either the left or right side. Thus space-qwerty is backward compatible with qwerty. Note, this keyboard driver only works with kernel version 2.6.24 or higher.
A fly in the ointment is the triple chords that result from a capital, other-side letter. You must hold down the shift and space, and type the appropriate key. This can be a bit cumbersome and error prone. Other alternative keyboards avoid triple chords, and bring the common letters back to the home row. These are presented below.
All typists, one or two handed, should realize that the qwerty layout is suboptimal. Placing f and j beneath the index fingers is preposterous, when e and t are the most common letters in the English language. The qwerty keyboard, which has become a sad standard, was deliberately designed to keep mechanical typewriters from jamming, e.g. by slowing the typist down, and by preventing adjacent keys from being pressed in sequence. This ill-designed keyboard is even more unworkable if you only have one hand. Clearly a new keyboard is called for. Dvorak is one such keyboard – here is another.
The keyboard described here is for the right hand. A left hander will want to reflect everything through the gh midline. Both versions are implemented under Linux; you can download either one.
To begin, place the four fingers of your right hand on fghj. Many keyboards provide bumps, or other tactile indicators, for f and j, so you should be able to find your home keys without looking. Bear in mind, these keys are no longer linked to the letters fghj, but I refer to them as such, so you will know what I’m talking about. Hereinafter, bold letters will denote keys on the standard keyboard. Thus your home row is fghj.
The biggest change, which takes some getting use to, is the new space/shift convention. The space bar is used to make letters upper case — and that’s all. If you want to insert a space into your text, hit the k key with your pinkie. This is how I deal with the thorny issue of capital letters. I tried assigning the shift function to other keys, but none of them worked as well as the space bar. The space bar‘s length is its advantage. You may have to stretch left or right to hit a letter, but you can always hold down the space bar while doing so. In fact you can hold it down while typing an entire word or phrase, sliding along its length as necessary. If your thumb doesn’t work well (depending on your disability), you can still hold down the space bar with the heel of your hand, or perhaps the other hand. Once you get use to the new convention, it is easy to enter capital letters as necessary, and the new space key isn’t really an inconvenience.
The key formerly known as l, just to the right of the space key, performs the backspace function, erasing typos in real time. I map l to control-h, which is a semi-standard backspace character. If your computer uses a different backspace character, edit the key configuration file accordingly.
The backspace is as far right as you ever need go. Similarly, you will never need to stretch more than two columns to the left of the f key. Thus, your hand remains, more or less, in the home position, and with practice you can learn to type quickly and accurately.
Let’s review the new keys on the home row. As mentioned above, I’ve chosen letters that are common in the English language. The original keys, sdfgh are now, respectively, fneht. To type the word “the”, simply roll your three fingers down in sequence, without leaving the home keys. For capital THE, hold the space bar down and do the same thing.
At this point you’re probably wondering what happened to the j key. It doesn’t correspond to a letter in the new keyboard. Instead, it activates an alternate mode. Just as shift turns lower case letters into upper case, so the j key turns letters into various punctuation marks. This will be described later. For now, realize that m, j, u, and 7 are used to activate modes, and do not correspond to specific letters or symbols.
Moving to the bottom row, the keys xcvbn,. correspond to ygloibq, remembering that m activates a mode. As before, hold the space bar down while striking these keys to obtain upper case letters. The z key doubles as a return key. This key is somewhat easier to reach than the traditional return.
On the third row, wertyio correspond to pcrasdu, and on the top row, 2345689 correspond to zkmwvxj. That’s all the letters, lower and upper case.
To access the punctuation marks used in casual writing, hold down the j key. As you might imagine, the most common punctuation marks are on the home row. With the j key held down, sdfgh correspond to *?/.,. Moving to the rows below and above, xcvbn corresponds to #!='" and werty corresponds to :;$-+. Four keys on the top row have meaning with the j key depressed. The 3 key becomes a tab, and the next three keys become %_&.
When the m key is held down, you have access to the remaining punctuation marks, used in C programming and other exotic applications. Starting at the bottom and going up, xcvbn corresponds to @[](), sdfgh corresponds to ~{}<>, and erty corresponds to `^|\.
When the u key is held down, you have access to a numeric keypad. The keys 456, rty, and fgh correspond to the digits 1 through 9, like the telephone keypad. Unlike the phone, zero is to the left, over the e key, rather than below.
When the 7 key is held down, you have access to several Linux-specific functions. These functions would be difficult to activate, without this keyboard, because they use alt/control keys. The numbers 1 through 6, on the aforementioned keypad, now swap in virtual consoles 1 through 6. Also, the 3 key activates control-c (program interrupt), and the e key activates control-d (end of input).
This keyboard allows you to enter any control or alt letters. Since control characters are used more often, I swapped the control and alt keys. Now the control key is easier to reach, just to the left of the space bar, leaving the fingers free to designate the control characters. Alt characters are definitely a stretch, but these are rarely used.
Linux users can experiment with the one-handed keyboard right away. Download either the left handed or right handed keyboard configuration file, and run loadkeys on that file. However, before doing this, you should write a small script that will return your keyboard to normal. Something like: `loadkeys /etc/sysconfig/console/default.kmap’. Call your script +++, so you can run it using the + key on the far right of your keyboard. The number pad, cursor keys, and function keys are not affected by this new keyboard, so you can always run a program called +++, even if the new keyboard doesn’t work, or you can’t figure out how to use it. In fact, you should make +++ a function in your .bashrc script. Thus you can invoke it from any console, and any directory. You always have a way back.
If you don’t have a default.kmap file, create one via `dumpkeys >/etc/sysconfig/console/default.kmap’. Be sure to test your +++ command before trying any of these experimental keyboards. Remember that you have to be root to run loadkeys.
Please send comments or feedback to the author, Karl Dahlke.
Right-handed configuration file:
# Key assignments for right handed (only) typing.
# Left-handers can reflect this configuration through the gh midline.
# The upper four modes, ShiftL ShiftR CtrlL CtrlR, are generally not used.
# We use them here, so that ShiftR h can become a period (for example).
# In other words, we've got more states than you usually see
# in a keymap file.
keymaps 0-1,4-5,8-9,16, 32, 64, 128
# Here come the new modifiers.
keycode 50 = ShiftL
keycode 36 = ShiftR
keycode 22 = CtrlL
keycode 8 = CtrlR
# Space bar becomes new (closer) shift.
keycode 57 = Shift
# Alt, next to the space bar, becomes control,
# only because we use control keys more often.
# Control, farther away, becomes alt.
keycode 56 = Control
keycode 100 = Control
keycode 21 = Alt
keycode 97 = Alt
keycode 58 = Caps_Lock
# redefine 2 through 9
keycode 3 = z Z Control_z Control_z Meta_z Meta_Z VoidSymbol VoidSymbol VoidSymbol Control_c
keycode 4 = k K Control_k Control_k Meta_k Meta_K VoidSymbol Tab VoidSymbol Control_c
keycode 5 = m M Control_m Control_m Meta_m Meta_M VoidSymbol percent one Console_1
keycode 6 = w W Control_w Control_w Meta_w Meta_W VoidSymbol underscore two Console_2
keycode 7 = v V Control_v Control_v Meta_v Meta_V VoidSymbol ampersand three Console_3
keycode 9 = x X Control_x Control_x Meta_x Meta_X
keycode 10 = j J Control_j Control_j Meta_j Meta_J
# redefine w through o
keycode 17 = p P Control_p Control_p Meta_p Meta_P VoidSymbol colon
keycode 18 = c C Control_c Control_c Meta_c Meta_C grave semicolon zero Control_d
keycode 19 = r R Control_r Control_r Meta_r Meta_R asciicircum dollar four Console_4
keycode 20 = a A Control_a Control_a Meta_a Meta_A bar minus five Console_5
keycode 21 = s S Control_s Control_s Meta_s Meta_S backslash plus six Console_6
keycode 23 = d D Control_d Control_d Meta_d Meta_D
keycode 24 = u U Control_u Control_u Meta_u Meta_U
# redefine s through l
keycode 31 = f F Control_f Control_f Meta_f Meta_F asciitilde asterisk
keycode 32 = n N Control_n Control_n Meta_n Meta_N braceleft question
keycode 33 = e E Control_e Control_e Meta_e Meta_E braceright slash seven
keycode 34 = h H Control_h Control_h Meta_h Meta_H less period eight
keycode 35 = t T Control_t Control_t Meta_t Meta_T greater comma nine
keycode 37 = space
keycode 38 = Control_h
# redefine x through .
keycode 45 = y Y Control_y Control_y Meta_y Meta_Y at numbersign
keycode 46 = g G Control_g Control_g Meta_g Meta_G bracketleft exclam
keycode 47 = l L Control_l Control_l Meta_l Meta_L bracketright equal
keycode 48 = o O Control_o Control_o Meta_o Meta_O parenleft apostrophe
keycode 49 = i I Control_i Control_i Meta_i Meta_I parenright quotedbl
keycode 51 = b B Control_b Control_b Meta_b Meta_B
keycode 52 = q Q Control_q Control_q Meta_q Meta_Q
# Here's a return that's a little closer than the "real" return
keycode 44 = Return
From: https://web.archive.org/web/20120120002630/http://www.eklhad.net/linux/app/onehand.html