### Optimal SMS keyboard layouts

One of the things I find very frustrating about typing SMS messages on my phone is that I often find that the next letter I want to type is actually on the same key that I just pressed. And that slows me down because either I wait for the timeout, or I click the right arrow key to move on.

For example, here's a standard keyboard on cell phones:
`     abc def  1   2   3 ghi jkl mno  4   5   6pqrs tuv wxyz  7   8   9`

Very common English letter pairs such as 'ed' and 'on' appear on the same key meaning that if you need to type one of these you are going to incur the cost of dealing with the 'next letter is on same key' problem. In addition, the most common English letters are more than one click away; the most common English letter 'e' is two clicks, 'o' is three, 'n' is two, etc.

What you really want is a keyboard layout that means that most common letters are as few clicks away as possible, and that the common letter pairs are on different keys so that you can maximize typing speed. And if possible make the layout as close as the current one so that it's easy to learn.

There are some people who propose squeezing QWERTY into the the current keyboard. This ends up with a key that starts with 'q' and another that starts with 'z': two of the least common keys are given pride of place on the keyboard.

Other propose using dictionaries. I think the fastest typing would be on an intelligently laid out keyboard without the need for a dictionary.

I took the 1000 most common words in English as a test set, and performed three keyboard optimizations: one by hand and two using different sets of common letter pairs and tested them against the 1000 most common words. Each set received a score equal to the number of clicks required to type all 1000 words. A single click on a key was worth one click (so typing 'a' is one click, typing 'q' is two, etc. on the standard keyboard), and the cost of handling the 'next letter is on same key' was set at the same time as two clicks.

I used letter and letter pair frequency information from the excellent book Cryptanalysis. And of course I wrote some code to perform the layout of the keyboards optimizing for the least number of clicks per common letter and the least number of same key clicks for letter pairs.

The standard keyboard layout gets a score of 12,447 clicks.

The following machine generated layout can be used to type the same words in 8757 clicks (70.35% of the clicks of the standard keyboard):
`     acb euwj  1   2   3 ipg  hmx olv  4   5   6sfq  tdyz nrk  7   8   9`

This keyboard doesn't look anything like the original keyboard so I then used a shorter list of letter pairs and hand optimized the keyboard to balance clicks and similarity. The result is 8,912 clicks (or 71.6% of the standard keyboard) and a nice layout:
`     adc efb  1   2   3 igj hlk omz  4   5   6srpq tuv nwyx  7   8   9`

Now, if there was only a way to get that on my RAZR I could save 30% of my typing time.

Anonymous said…
Where's the "d"? Your last layout seems to be lacking something important and gave the letter "z" pride of double placement.

{^_-}
Anonymous said…
d in the original place of the b
JoeC said…
It might save you 30% typing time, but how many people are really touch typists on phones? For those who rely on knowing the alphabet to efficiently hunt and peck, you would slow them down by far more than 30%.

By moving letters around how are people going to call 1-900-SEXCHAT? Except for the addition of the Q and Z recently, the "keyboard" has been the same since rotary phones.

Assuming you ignore that problem, why are you not using the 1 key? The only reason not to use the one key is legacy compatibility which you are already throwing out.

In your examples, grouping adc or even acb are bad ideas. Your first grouping should be clearly different from the standard phone keyboard so users instantly recognize the layout they are using. Don't forget Dyslexic users. Or how many users switched to the more efficient DVORAK keyboard.

I also wonder about the placement of the least used letters at the bottom. I find it easier to hit the top and bottom row than the middle.
Anonymous said…
I'm a touch-typist on my phone, and even though it's illegal in australia i quite often send sms's while i'm driving - i hold the phone down near my leg and type away - double-check all the text when i get to a red light or something and then send it.

I'm a fan of predictive text too - it eliminates your problem of having 'ed' etc on the same number. And i've memorised most of the words that come up so that i can change it from "good" to "home" etc without having to look.
Anonymous said…
I recently bought a used Nokia 6820, you know the one which flips open to reveal a full keyboard on both sides of the screen. I didn't buy it for this feature but having now been getting used to it for a few weeks, it makes this sort of problem seem rather stone-age.

I'm really surprised if you don't have T9 / predictive text on the Razr? That too makes the keyboard a secondary problem, although it introduces a nice set of new problems. (Me, I write in three languages regularly, sometimes in the same message ...)
Anonymous said…
You should use your phone for calliing instead of using it to send SMSs: you are not 15 years old, are you?

### Making an old USB printer support Apple AirPrint using a Raspberry Pi

There are longer tutorials on how to connect a USB printer to a Raspberry Pi and make it accessible via AirPrint but here's the minimal one that's just a list of commands and simple instructions. 1. Install Raspbian on a SD card 2. Mount SD card on some machine and navigate to / . Add a file called ssh and set up wpa_supplicant.conf for WiFi access. Now you have headless and don't need a keyboard or monitor. 3. Boot. Login. sudo raspi-config . Change password. 4. Connect printer via USB cable 5. Then execute the following sequence of commands to set up CUPS and make it accessible on the network. sudo apt-get update sudo apt-get full-upgrade sudo apt-get install cups sudo usermod -a -G lpadmin pi sudo cupsctl --remote-any sudo systemctl restart cups 6. Visit http://raspberrypi:631/admin and add the local printer. Make sure "sharing" is enabled on the printer. 7. Then make sure AirPrint is set up sudo apt-get install avahi-daemon sudo reboot Printer should work