Simple toy project which shows that you may build "mechanical keyboard" out of bunch of Lego bricks and 10cm of Ethernet wire.
I had Arduino Nano, cable and bag of Lego bricks laying around. Isn't it enough?
Flat Lego bricks are springy. So it's possible to wind up wire on it and build mechanical switch similar to one on the picture.
Build as any CMake based project:
mkdir build
cd build
cmake ..
make
For now, you have to open lego_button
sketch in Arduino IDE and upload it to your Arduino Nano. CMake support is not done yet.
Connect Arduino Nano to USB and type
cat /dev/ttyUSB0 | ./macropad