Rather than loading a rc keymap, it is also possible to set protocol decoders and set rc scancode to keycode mappings directly.
Note: You need to have read permissions on /dev/input for most of the options to work.
-a, --auto-load=CFGFILE Auto-load keymaps, based on a configuration file. Only works with --sysdev.
-c, --clear Clears the scancode to keycode mappings.
-D, --delay=DELAY Sets the delay before repeating a keystroke.
-k, --set-key=SCANKEY Set scancode to keycode mapping.
-p, --protocol=PROTOCOL Comma separated list of kernel protocols or BPF protocol to enable. All other protocols are disabled.
-e, --parameter=PARAMETER Comma separated list of parameters for the BPF protocol.
-P, --period\=PERIOD Sets the period to repeat a keystroke.
-r, --read Read and show the current scancode to keycode mapping.
-s, --sysdev=SYSDEV rc device to control, defaults to rc0 if not specified.
-t, --test test if the rc device is generating events
-v, --verbose Enables debug messages.
-w, --write=KEYMAP Reads the protocols and scancode to keycode mapping from the KEYMAP file, and enables those on the rc device.
-?, --help Prints the help message
--usage Give a short usage message
-V, --version print the v4l2-utils version
Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. Options can be combined together.
ir-keytable
To clean the keycode mapping and use a newer one:
ir-keytable -c -w /etc/rc_keymaps/nec_terratec_cinergy_xs.toml
To append more codes to the existing table:
ir-keytable -w /etc/rc_keymaps/nec_terratec_cinergy_xs.toml
To read the current scancode to keycode mapping on the second remote controller:
ir-keytable -s rc1 -r
To enable NEC protocol and load a BPF protocol, with a parameter for the BPF protocol:
ir-keytable -p nec,pulse_distance -e pulse_header=9000
If you do not know what protocol a remote uses, it can be helpful to first try with all kernel decoders enabled. The decoded protocol and scancodes will be displayed in the output:
ir-keytable -c -p all -t
License GPLv2: GNU GPL version 2 <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.