the following site gives detailed advice:
https://www.mythtv.org/wiki/HID_Remotes
for testing the remote control:
sudo evtest /dev/input/by-id/usb-Formosa21_USB_IR_Receiver-event-ir
to obtain the current keyassignments:
sudo ir-keytable -r -d /dev/input/by-id/usb-Formosa21_USB_IR_Receiver-event-ir > satkeytable
then, 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 ( https://wiki.archlinux.org/index.php/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.target
test:
systemctl start ir_remote.service
systemctl status ir_remote.service
autostart:
systemctl enable ir_remote.service