Reverse Engineering A Keyboard Driver Uncovers A Self-Destruct Code

Should you be able to brick a keyboard just by writing a driver to flash the lights on it? We don’t think so either. [TheNotary] got quite the shock when embarking on a seemingly straightforward project to learn C++ on the x86-64 architecture with Windows and sent it straight to Silicon Heaven with only a few seemingly innocent USB packets.

The project was a custom driver for the XVX S-K80 mechanical keyboard, aiming to flash LED patterns across the key LEDs and perhaps send custom images to the integrated LCD. When doing this sort of work, the first thing you need is the documentation of the communications protocols. Obviously, this was not an option with a closed-source project, so the next best thing is to spy on the existing Windows drivers and see how they worked. Using Wireshark to monitor the USB traffic whilst twiddling with the colour settings, it was clear that communications were purely over HID messages, simplifying subsequent analysis. Next, they used x32dbg (now x64dbg, but whatever) to attach to the existing driver process and trap a few interesting Windows system calls. After reading around the Windows API, a few candidate functions were identified and trapped. This gave them enough information to begin writing code to reproduce this behaviour. Then things got a bit odd.

Continue reading “Reverse Engineering A Keyboard Driver Uncovers A Self-Destruct Code”

A very tiny keyboard with RGB backlighting.

Tiny Custom Keyboard Gets RGB

Full-size keyboards are great for actually typing on and using for day-to-day interfacing duties. They’re less good for impressing the Internet. If you really want to show off, you gotta go really big — or really small. [juskim] went the latter route, and added RGB to boot!

This was [juskim]’s attempt to produce the world’s smallest keyboard. We can’t guarantee that, but it’s certainly very small. You could readily clasp it within a closed fist. It uses a cut down 60% key layout, but it’s still well-featured, including numbers, letters, function keys, and even +,-, and =. The build uses tiny tactile switches that are SMD mounted on a custom PCB. An ATmega32U4 is used as the microcontroller running the show, which speaks USB to act as a standard human interface device (HID). The keycaps and case are tiny 3D printed items, with six RGB LEDs installed inside for the proper gamer aesthetic. The total keyboard measures 66 mm x 21 mm.

Don’t expect to type fast on this thing. [juskim] only managed 14 words per minute. If you want to be productive, consider a more traditional design.

Continue reading “Tiny Custom Keyboard Gets RGB”

Tiny Trackpad Fits On Ergonomic Keyboard

Cats are notorious for interrupting workflow. Whether it’s in the kitchen, the garden, or the computer, any feline companion around has a way of getting into mischief in an oftentimes disruptive way. [Robin] has two cats, and while they like to sit on his desk, they have a tendency to interrupt his mouse movements while he’s using his Apple trackpad. Rather than solve the impossible problem of preventing cats from accessing areas they shouldn’t, he set about building a customized tiny trackpad that integrates with his keyboard and minimizes the chance of cat interaction.

The keyboard [Robin] uses is a split ergonomic keyboard. While some keyboards like this might use a standard USB connection to join the two halves, the ZSA Voyager uses I2C instead and even breaks the I2C bus out with a pogo pin-compatible connector. [Robin] originally designed a 3D-printed integrated prototype based on a Cirque trackpad that would clip onto the right side of the keyboard and connect at this point using pogo pins, but after realizing that the pogo pin design would be too difficult for other DIYers to recreate eventually settled on tapping into the I2C bus on the keyboard’s connecting cable. This particular keyboard uses a TRRS connector to join the two halves, so getting access to I2C at this point was as simple as adding a splitter and plugging in the trackpad.

With this prototype finished, [Robin] has a small trackpad that seamlessly attaches to his ergonomic keyboard, communicates over a standard protocol, and avoids any unwanted cat-mouse action. There’s also a build guide if you have the same keyboard and want to try out this build. He does note that using a trackpad this small involves a bit of a learning curve and a larger-than-average amount of configuration, but after he got over those two speed bumps he hasn’t had any problems. If trackpads aren’t your style, though, with some effort you can put a TrackPoint style mouse in your custom mechanical keyboard instead.

Exploded view of a mini PC built into a keyboard.

Keyboard Contains Entire Mini PC, Just BYOD

When we talk about keyboards that do it all, we usually mean either big ones with lots of keys and doodads like rotary encoders and displays, or small ones with lots of layers (and usually a few doodads, too). But this — this is something else entirely. Chinese PC maker Linglong have crammed an entire mini PC into a keyboard that’s small enough to fit in your back pocket. Oh, and it folds, too. All you need is a display.

Why do you need a display? Why not include one, if you’re going to wedge everything else in there? Well, the company envisions its users pairing it with a VR or AR glasses. But we can see use cases far beyond ownership of special spectacles, of course.

For instance, office work. Linglong says this key-puter (you read it here first) will last up to ten hours for light use, and nearly six hours for watching movies, but heavy use will have you down to four hours, which really isn’t that bad.

Spec-wise, it looks pretty good, with an AMD Ryzen 7 and either 16 or 32 GB of memory and a half- or full-terabyte hard drive. The whole thing is around 4 x 6″ (15 x 10cm), presumably in the folded orientation, and weighs less than two pounds (800 g). The projected cost is $400-500 depending on specs.

Unfortunately, this little key-puter isn’t available just yet. There are just 200 units available for Beta testing, and no, we don’t have one!

Main and thumbnail images via Linglong

Go Forth With This Portable Programmer

When choosing a low-level language, it’s hard to beat the efficiency of Forth while also maintaining some amount of readability. There are open source options for the language which makes it accessible, and it maintains its prevalence in astronomical and other embedded systems for its direct hardware control and streamlined use of limited resources even though the language started over 50 years ago. Unlike 50 years ago, though, you can now take your own self-contained Forth programmer on the go with you.

The small computer is built on a design that [Dennis] built a while back called my4TH which has its own dedicated 8-bit CPU and can store data in a 256 kB EEPROM chip. Everything else needed for the computer is built in as well but that original design didn’t include a few features that this one adds, most notably a small 40×4 character LCD and a keyboard. The build also adds a case to tie everything together, with ports on the back for I2C and power plus an RS232 port. An optional battery circuit lets the computer power up without an external power supply as well.

Continue reading “Go Forth With This Portable Programmer”

2024 Business Card Challenge: Tiny MIDI Keyboard

The progress for electronics over the past seven decades or so has always trended towards smaller or more dense components. Moore’s Law is the famous example of this, but even when we’re not talking about transistors specifically, technology tends to get either more power efficient or smaller. This MIDI keyboard, for example, is small enough that it will fit in the space of a standard business card which would have been an impossibility with the technology available when MIDI first became standardized, and as such is the latest entry in our Business Card Challenge.

[Alana] originally built this tiny musical instrument to always have a keyboard available on the go, and the amount of features packed into this tiny board definitely fits that design goal. It has 18 keys with additional buttons to change the octave and volume, and has additional support for sustain and modulation as well. The buttons and diodes are multiplexed in order to fit the IO for the microcontroller, a Seeed Studio Xiao SAMD21, and it also meets the USB-C standards so it will work with essentially any modern computer available including most smartphones and tablets so [Alana] can easily interface it with Finale, a popular music notation software.

Additionally, the project’s GitHub page has much more detail including all of the Arduino code needed to build a MIDI controller like this one. This particular project has perhaps the best size-to-usefulness ratio we’ve seen for compact MIDI controllers thanks to the USB-C and extremely small components used on the PCB, although the Starshine controller or these high-resolution controllers are also worth investigating if you’re in the market for compact MIDI devices like this one.

Continue reading “2024 Business Card Challenge: Tiny MIDI Keyboard”

MIDI Spoon Piano Is Exactly What You Think It Is

Pianos traditionally had keys made out of ivory, but there’s a great way to avoid that if you want to save the elephants. You can build a keyboard using spoons, as demonstrated by [JCo Audio]. 

The build relies on twelve metal spoons to act as the keys of the instrument. They’re assembled into a wooden base in a manner roughly approximating the white and black keys of a conventional piano keyboard, using 3D-printed inserts to hold them in place. They’re hooked up to a Raspberry Pi Pico via a Pico Touch 2 board, which allows the spoons to be used as capacitive touch pads. Code from [todbot] was then used to take input from the 12 spoons and turn it into MIDI data. From there, hooking the Pi Pico up to a PC running some kind of MIDI synth is enough to make sounds.

It’s a simple build, but a functional one. Plus, it lets you ask your friends if they’d like to hear you play the spoons. The key here is to make a big show of hooking your instrument up to a laptop while explaining you’re not going to play the spoons a la the folk instrument, but you’re going to play a synth instead. Then you should use the spoon keyboard to play emulated spoon samples anyway. It’s called doubling down. Video after the break.

Continue reading “MIDI Spoon Piano Is Exactly What You Think It Is”