Multiple keystroke on button press

September 10, 2024, 18:41

nex0rion

I'm using the Raspberry Pi Zero 2W and I want to know if it is possible to use the dtoverlay to simulate multiple keystroke with only one Gpio? I want to send Ctrl+C by pressing a single button but I had no luck with dtoverlay. I thought that I could do the same thing with python, a daemon-like script that simulate the keystroke when the two gpio are down, but I don't know how to simulate keystroke on the console (no X11 or Wayland)

nex0rion

I solved the problem with a python script that liste for gpio falling and then send a ctrl+c keystroke

oops.se

Well done!