[mythtv-users] Lirc keycodes and Myth remote

Stephen Worthington stephen_agent at jsw.gen.nz
Fri Feb 14 18:28:46 UTC 2020

On Fri, 14 Feb 2020 09:41:00 -0800, you wrote:

>This is probably an easy question bordering on a dumb question but I have
>been googling and trying things all morning and nothing works.
>I want to add a command to my programmable learning remote. I first set it
>up 10 years ago so do not remember what I did except that I used an old
>remote, captured the key codes, then used them to set up lircrc and my
>remote. All I want to do is find a key code that is not used and map it to
>"T" so I can toggle CC with a single press of my remote.
>My problem is that I cannot figure out how to read the key presses of my
>old remote. irw will read the key presses of my learning remote but not the
>old remote. I tried ir-keytable but I get an error "/sys/class/rc/: No such
>file or directory" and googling for solutions there offers suggestions that
>do not work.
>My question is: how do I read the keycodes of my old remote? If I can do
>that, I can edit lircrc and add my new command.

Shut down lirc and run:

sudo ir-keytable -t

That should show you what each key on your remote is when you press

You may need to work out which IR receiver you are using if there is
more than one.  Use:

sudo ir-keytable

to show all the IR receivers, then add a "-s rc1" option for example
to select the second (rc1) receiver.

To shut down lirc on systemd based systems (Ubuntu, Debian, ...), do

sudo systemctl stop lircd

and to restart it afterwards:

sudo systemctl start lircd

More information about the mythtv-users mailing list