"Hotkey" box with Leonardo--need more pins!

I'm building a box with lighted pushbutton switches (momentary-SPST N.O. with LED) that sends keystrokes defined in the sketch to software running on a PC. I've built a working prototype using the Leonardo. Works great! But I need about 14 buttons and the Leo only has 14 outputs. Each button requires two pins: one for the hotkey command and one for the LED (which indicates the last button pressed and is handled in the sketch also.)

I apologize if this has already been answered but I can't find it if it has. Do I have to have 2 Leonardos? If I do, what's my PC going to think about having 2 more "keyboards" connected to it? Is their a way to expand the Leo to have more outputs?

Thanks in advance.

You can multiplex te buttons in a matrix and charlieplex the LEDs to save pins. If that isn't enough, you can use shift registers or IO expanders.

Or you can use an LED and a button on one single pin, using some clever coding.


OK, I give. What clever programming would allow me to address the button and the LED separately?

You can use the analog pins as normal digital pins.