when i plug in the TechniSat Formosa21 USB IR Receiver,
/dev/input/by-id/usb-Formosa21_USB_IR_Receiver-event-ir appears and keypresses on the remote control can be seen in a text editor. For instance, pressing the mute button on the rc, the character 'm' appears in a text editor; when pressing louder or less louder, the arrow-right or arrow-left function is triggered. How can i remap those keys to the expected functionality (on Kubuntu 16.04 64 Bit)?
1 Answer
the following site gives detailed advice:
for testing the remote control:
sudo evtest /dev/input/by-id/usb-Formosa21_USB_IR_Receiver-event-irto obtain the current keyassignments:
sudo ir-keytable -r -d /dev/input/by-id/usb-Formosa21_USB_IR_Receiver-event-ir > satkeytablethen, the file "satkeytable" can be edited to assign different keys.
write the new keyassignments to the system:
sudo ir-keytable -w /path/to/satkeytable -d /dev/input/by-id/usb-Formosa21_USB_IR_Receiver-event-ir(the new assignments will be available when the graphics server is restarted, but will be lost after reboot). If the infrared receiver is plugged in already at boot time, the keytable changes can be made permanent with systemd ( );
content of /etc/systemd/system/ir_remote.service (new file):
[Unit]
Description=remap Formosa21_USB_IR remote control keys
[Service]
ExecStart=/usr/bin/ir-keytable -w /path/to/satkeytable -d /dev/input/by-id/usb-Formosa21_USB_IR_Receiver-event-ir
[Install]
WantedBy=multi-user.targettest:
systemctl start ir_remote.service
systemctl status ir_remote.serviceautostart:
systemctl enable ir_remote.service