The gf is a gamer girl and wanted a special keyboard. The ones that exist are either out of stock or crappy or both so we decided to design our own, configured exactly to her needs!
We are using an ATmega32u4 since it has direct support for USB 1.1 and is well supported by the open source keyboard software we want to use.
After deciding on a general layout and lots of thinking about positioning stuff we added an analog thumbstick for direction control. But since it’s supposed to work as a keyboard I had to design a circuit that turns the analog signal into a digital one while keeping the threshold for each direction adjustable. I am using a standard LM324 Quad OpAmp, with two of the 4 units dedicated to one pot of the joystick, basically a reversed window detector circuit. The two potentiometers in the circuit make the sensitivity in each direction adjustable from middle to end position of the joystick. The outputs each control a transistor that then connects the according row and column lines of the keyboard matrix.
Everything else in the circuitry is basically a default keyboard matrix with diodes on each key and the needed parts to run the ATmega32u4, mostly borrowed from the original Arduino Leonardo schematics.
The rest is basically done in software, which keeps the hardware in general very simple. And the next thing to do is designing and printing a case…