!lm10
!rm76
Binary Keyboard Input

David Holladay, from Madison, Wisconsin, wrote a recent article for the Adam & Eve Apple II Users Group about a technique he uses for turning the Apple keyboard into a Braille input device.  He chose 6 keys which can be "simultaneously" depressed to give a composite code.  The keys form a 2-by-3 rectangle, like the dots of Braille characters.

Because the Apple keyboard has N-key rollover, simultaneous depression of several keys results in each keycode being sent to the program one at a time.  The order that the codes are produced appears random to the program.  Some quirks in the way the Apple keyboard is wired up prevent the N-key rollover from working with every combination of keys.  Some of them OR together to create a ghost code, different from the actual depressed keys.  Apple has used many different keyboards, so the keys which can be used for David's program vary considerably from one Apple to another.

After playing around with his program for a while, I got interested in making a Binary Input Keyboard, rather than a Braille one.  My keyboard, which is almost 4 years old (Apple serial # 219!), allows me to press any combination of the keys J, K, L, 1, 2, 3, and 4.  I set up these keys with binary weights of hex 40, 20, 10, 08, 04, 02, and 01 respectively.

When you type a combination of these seven keys all at once, the time interval between keys is much shorter than the normal spacing between keystrokes.  The program waits for one keyboard strobe, and then initiates a timeout loop.  All keycodes received within the timeout window will be considered to have been struck "simultaneously".  Each keycode is compared with the list of seven keys (JKL1234), and the appropriate binary weight ORed into the character.  If a keycode is received which is not in the legal character list, the bell rings.

I made a test loop which calls the input routine, and displays the hex code on the screen.

The choice of keys (JKL1234) works fine on my Apple, but it may not work on yours.  Experiment with various choices until you find seven keys which will work together on your keyboard.  Then modify line 1420 with your list of keys, and it will be ready to go.

Possible applications?  Maybe fast input of hexadecimal machine language programs.  You would have to add one more key so that all eight bits could be specified.  And you would have to train your mind and fingers to instantaneously translate from hex to binary finger-patterns.  Or, maybe some sort of a game.  The basic idea of reading simultaneous keystrokes could effectively create new keys.  Or, maybe the basic idea of simultaneous keystrokes could be used for entering secret passwords.
