Hi Karl. Sounds like you’re describing a multiplexer circuit. There are plenty of tutorials for doing this with arduino but definitely a firmware mod. Now that I’m running Ramps I’m planning on making a number of changes. I’ve already modded my firmware to accept file extensions with g or n. I’m planning to create a pendant to control axis movements, laser power and zero touch plate set up too.
How many buttons did you need? I was looking at ramps schematic and it looks like there’s a few unused i/o pins there so lots of opportunity to add input device. Since Marlin accepts commands and reports status over serial protocol the ideal thing is to use a cheap arduino pro micro to build a pendant with xyz axis display and jog controls as a seperate device and have it communicate with marlin over a serial( wired or Bluetooth) connection.