I have a digital photo frame running on a Raspberry Pi hooked up to a small TV, and want an easy way to control playback. I already need a remote for the TV, so why not use that? Below I’ll go through the setup process I used to turn IR commands into key presses on a Pi running Bookworm, including an Ansible playbook for automating setup. Manual Setup The Hardware The first thing we need is an IR receiver to physically sense the infrared signals broadcast by the remote.