@ken_fallon this answer recommends the mouse hack because then it'll work easily with existing software.
https://ham.stackexchange.com/questions/1256/using-a-morse-code-key-with-a-computer
I was gonna recommend something like the Sega Genesis joypad driver, or DB9 joystick driver. I messed with that years ago and the electrical connections are simple and translate easily to the driver, and the driver was easy to modify to have the button behavior be different. I'm not sure that type of setup would work with whatever software you want to use though.