With an IR transmitter connected to your RPi you could simply use irexec to execute irsend when a specific button is pressed.
irexec is available in LE but not run by default - you'll need to start start it via autostart.sh or a systemd service.
You'll probably need to delay the irsend call a bit (eg do it via a shell script and add a sleep 1 before), otherwise the IR signal from your remote (where you are pressing the button) will interfere with the IR signals transmitted by the RPi.
so long,
Hias