Close
0%
0%

Engelbart Keyset

Douglas Engelbart invented both the mouse AND a chording keyset. The mouse was a massive success. The keyset much less so.

Public Chat
Similar projects worth following
The Engelbart keyset cooperates with the mouse to let five buttons plus three mouse buttons generate all 101 keycodes plus more. This project reproduces the Engelbart keyset on modern hardware using a USB mouse. Previous versions supported PS/2 mice, but they are obsolete now.

The project consists of a 3D printed case, a PCB, code to read the mouse and buttons to emulate a keyboard & mouse, and a Teensy 4.1. The latter has a USB client port and a USB host port, crucial to supporting USB mice.

If you watch the Mother Of All Demos, you can see Douglas use the keyset in conjunction with the mouse. The keyset by itself only has five buttons. That's enough for the 26 letters in the alphabet, but not much more. In order to expand the space, more buttons are needed. The mouse has three, so Douglas programmed his system to treat the mouse buttons like keyset buttons if a keyset button is pressed before the mouse button. That gives eight buttons, plenty for a 101-key keyboard plus special symbols used by Augment in the MOAD.

That worked fine for Douglas because he had custom hardware interfacing the keyset and mouse to the computer. The keyset was just five buttons, and the mouse was just X and Y quadrature and three buttons.  But modern mouses aren't built in conjunction with a keyset. They interface directly to the computer via PS/2 or USB. All OSes that talk to a mouse will support a USB mouse.

The difficulty of trying to make an OS-independent keyset is that the OS is already talking to the mouse, so to use mouse+keyset, you would need OS support and there goes your OS independence flying out the window. No. In order to have OS independence, you need hardware that talks to the mouse and transmits it to the computer. 

At first, I used a PS/2 mouse interface, because it's just a clocked serial interface which is well-documented. Trouble is that even when I started, PS/2 was on its way out. There are various PS/2 libraries for the Arduino. I was able to read data coming from a wheel mouse, interpret it, and send it on or intercept it. USB devices are allowed to present multiple USB interfaces, specifically a USB keyboard and a USB mouse. 

There is plenty of code for USB keyboards using a Teensy or other Arduino-class hardware where processor connects directly to the USB interface. The original Arduino connected using a USB serial device which can only be USB serial.  Teensies have never had this problem, which has been corrected in later Arduino models. Teensy hardware is rock solid, so I've stuck with them.  I found that the Teensy 4.1 supports USB host mode as well as USB client mode.

The keyset works by scanning five switches. As you add switch closures, that builds up the key code. When you release any switch, that transmits the current key code. If you keep releasing switches, nothing happens. If you start to add more switch closures, that starts building a new keycode.

The mouse connection is a straight pass-through of mouse information if no keyset switches are pressed. Whatever your mouse sends will get forwarded to the computer. If any keyset switch is pressed, and you press a mouse button, that button press is intercepted and used to form the key code. When you release any button or switch, that transmits the keycode formed by the combination of the mouse buttons and switches.

As you can see from the photo of the Teensy not in a case, there is almost nothing on the PCB -- just wires for the switches to the Teensy, and wires to the USB B socket from the Teensy. That's it! Power comes from the computer via the Micro-USB, and it powers whatever kind of mouse you hook up. Could be wired, could be wireless, either works.

The reasoning behind using mouse and chording keyboard in combination (as opposed to the standard QWERTY keyboard found between chording and mouse) is given at Englebart's Violin.

JPEG Image - 2.52 MB - 06/14/2022 at 22:03

Preview
Download

keyset.kicad_pcb

PCB source for KICAD

x-kicad-pcb - 95.79 kB - 06/14/2022 at 13:19

Download

keyset.sch

Schematic source for KICAD

x-kicad-schematic - 3.77 kB - 06/14/2022 at 13:19

Download

augment-cuecard-keyset.jpeg

Doug's button to keycode mapping from the Augment project.

JPEG Image - 1.83 MB - 06/14/2022 at 13:18

Preview
Download

engelbart.ino

Source code, much of which is from the USB host Teensy code written by Paul Stoffregen.

x-arduino - 12.52 kB - 06/14/2022 at 13:18

Download

View all 13 files

View all 11 components

  • Top case

    Russ Nelson06/19/2022 at 01:43 0 comments

    Added a top case part, to secure the key switch rod and keep the keys from flipping up too high.

View project log

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates