Finally tried it: you're right.  For some
reason it seems much more difficult than
looking up a word in a dictionary; either
handling the pages makes the slow process
seem faster, or the analog nature of being
able to go {for,back}ward a {little,lot}
is easier on the wetware.

> Even with the probabilities from my old email, I can't input text
> nearly as fast with this method as I can with, say, Tegic T9.  I tried
> a certain short phrase; keyboarding it with QWERTY, it took me about 3
> seconds; with T9, I entered it in 25 seconds; with the traditional
> keypad entry "press 2 once for A, twice for B, three times for C", it
> took 37 seconds; with this 4-key method, it took me 148 seconds with
> the probabilities guessed from /usr/share/dict/words and 116 seconds
> with word probabilities from my email.  Conditional probabilities
> based on previous words might help some.

I never learned to code Morse, but it seems
that 20 wpm is the equivalent of 55 wpm for
a typist, which implies that a one-key (but
expert-friendly) solution could've entered
that phrase in about 10 seconds.

Maybe this is of interest?
<http://altmark.nat.uni-magdeburg.de/~jschulen/morse/cw_key.html>
> CW_KEY is a tiny program to control your computer with only few keys
> (1..3) using morse code.

-Dave

:: :: ::

#!/usr/bin/python
#
# eviscerate Kragen's four-key input method, and instead use
# a linear search method with five keys: ("rogue" keys + space)
#                  ^
#          larger (k) jumps
#  < jump back (h) + (l) jump fwd >     (spacebar) accepts
#         smaller (j) jumps
#                  v
# would something like mouse-acceleration (with the keyboard
# repeats) work?  It might not only be better for zooming,
# but would also get this technique down to three keys.
#
import os, sys

def chomp(line):
    if line.endswith('\n'): return chomp(line[:-1])
    return line

def read_wordlist(filename):
    class wordlist:
        def __init__(self, filename):
            self.filename = filename
            infile = open(filename)
            self.words = []
            for line in infile.xreadlines():
                word = chomp(line)
                self.words.append(word)
            infile.close()
        def start(self): return 0
        def end(self): return len(self.words)
    return wordlist(filename)

def bound(val, low, high):
    i = int(val)
    if i < low:         i = low
    if i >= high:       i = high
    return i

class cursor:
    def __init__(self, wordlist):
        self.wordlist = wordlist
        self.max   = len(self.wordlist.words)
        self.scale = self.max/10
        self.pos   = self.max/2
        self.shuttle(0)
        self.zoom(1)
    def options(self):
        return '[%s]' % self.get()
    def get(self):
        return self.wordlist.words[self.pos]
    def zoom(self, how):
        self.scale = bound(self.scale * how, 1, int(self.max/10))
    def shuttle(self, how):
        self.pos = bound(self.pos + how * self.scale, 0, self.max-1)

def main():
    print "reading wordlist..."
    wordlist = read_wordlist('/usr/share/dict/words')
    os.system('stty cbreak -echo')
    backspace, delete = '\b', '\177'
    try:
        while 1:
            c = cursor(wordlist)
            msg = ''
            while 1: 
                msg += c.options()
                sys.stdout.write(msg)
                char = sys.stdin.read(1)
                sys.stdout.write((backspace + ' ' + backspace) * len(msg))
                msg = ''
                if char == 'h':
                    c.shuttle(-1)
                elif char == 'l':
                    c.shuttle(+1)
                elif char == 'j':
                    c.zoom(0.1)
                elif char == 'k':
                    c.zoom(10)
                elif char == ' ':
                    break
                else:
                    msg = "unknown char '" + char + "' "
            sys.stdout.write(c.get() + ' ')
    finally:
        sys.stdout.write("exiting...")
        sys.stdout.flush()
        os.system('stty -cbreak echo')

if __name__ == '__main__': main()

Reply via email to