About ten years before this guide was written, Ladyada wrote a fairly early guide for the Adafruit Learning System: "USB NeXT Keyboard with an Arduino Micro." The NeXT Computer and its keyboard remain iconic, and on the tenth anniversary of that older guide—more than 2000 guides later—I couldn't resist the challenge of updating the code from Arduino to CircuitPython.

The software in this guide is only for the original NeXT keyboard with 5-pin connector; the mouse is not supported. Later NeXT keyboards that use a 4-pin connector use a different protocol.

The techniques in this guide may also be helpful in converting other classic keyboards that use a clocked serial protocol. The RP2040's "pio" peripheral is perfect for this kind of low level I/O task, making it a breeze to meet the microsecond timing requirements while still writing the bulk of the code in high-level Python.

Since there are just a few pins used, the Adafruit QT Py RP2040 makes a solid choice of board for the project. However, there's no reason you couldn't adapt the code to the KB2040, Raspberry Pi Pico, or other board based on the same microcontroller.

Jeff's Verdict

The good about the NeXT Keyboard:

  • Solid design
  • Nice keyswitches
  • How many times can I say "iconic" in this article?

The not so good:

  • Limited to 2-key rollover (+ modifier keys)
  • Layout of modifier keys may frustrate some
  • Missing F-keys, page up/down, etc.

The next page is Ladyada's original research about the keyboard protocol, which I followed closely while implementing the CircuitPython version. That's why it refers to Arduino. Don't worry, this really is a CircuitPython project.


Video of hand holding a QT Py PCB in their hand. An LED glows rainbow colors.
What a cutie pie! Or is it... a QT Py? This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new
In Stock
USB Type A to Type C Cable - approx 1 meter / 3 ft long
As technology changes and adapts, so does Adafruit. This  USB Type A to Type C cable will help you with the transition to USB C, even if you're still...
In Stock
1 x NeXT Computer Keyboard
"Non-ADB" NeXT Computer Keyboard with 5-pin Mini-DIN connector
1 x Mini-DIN connector
Mini-DIN 5-pin receptacle, panel mount
2 x Mounting screws
M2.5x6 metal screws

This guide was first published on Dec 07, 2022. It was last updated on Feb 27, 2024.

This page (Overview) was last updated on Nov 23, 2022.

Text editor powered by tinymce.