emerge --ask media-tv/v4l-utils app-misc/lirc dev-python/python-evdev app-misc/evtest
modprobe -a ir-nec-decoder ir-rc5-decoder ir-rc6-decoder ir-jvc-decoder ir-sony-decoder ir-rc5-sz-decoder ir-sanyo-decoder ir-mce_kbd-decoder ir-lirc-codec
ir-keytable -c -p NEC,RC-5,RC-6,JVC,SONY -t
lirc protocol(nec): scancode = 0x40
austin@mobilemouse ~/mocp_i2c_lcd_ir_remote $ cat /lib/udev/rc_keymaps/my_remote.toml [[protocols]] name = "My_Remote" protocol = "nec" variant = "nec32" [protocols.scancodes] 0x45 = "KEY_POWER" 0x46 = "KEY_MODE" 0x47 = "KEY_MUTE" 0x44 = "KEY_PLAYPAUSE" 0x40 = "KEY_BACK" 0x43 = "KEY_FORWARD" 0x07 = "" 0x15 = "KEY_VOLUMEDOWN" 0x09 = "KEY_VOLUMEUP" 0x16 = "KEY_0" 0x19 = "KEY_SHUFFLE" 0x0d = "" 0x0c = "KEY_1" 0x18 = "KEY_2" 0x5e = "KEY_3" 0x08 = "KEY_4" 0x1c = "KEY_5" 0x5a = "KEY_6" 0x42 = "KEY_7" 0x52 = "KEY_8" 0x4a = "KEY_9"
ir-keytable -c -w /lib/udev/rc_keymaps/my_remote.toml -t
#driver table file * * my_remote.toml
mobilemouse /etc/init.d # cat irkeytable #!/sbin/openrc-run # Copyright 2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 name="irkeytable" description="add irkeytable config" start() { /usr/bin/ir-keytable -a /etc/rc_maps.cfg -s rc0 }
rc-update add irkeytable default
echo "ir-nec-decoder\nir-lirc-codec" >> /etc/modprobe.d/lirc.conf
austin@mobilemouse ~/mocp_i2c_lcd_ir_remote $ evtest No device specified, trying to scan all of /dev/input/event* Not running as root, no devices may be available. Available devices: /dev/input/event0: Solid State System Co.,Ltd. USB PnP Audio Device /dev/input/event5: meson_ao_cec /dev/input/event6: meson-ir Select the device event number [0-6]: 6 Input driver version is 1.0.1 Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0 Input device name: "meson-ir" Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 2 (KEY_1) Event code 3 (KEY_2) Event code 4 (KEY_3) Event code 5 (KEY_4) Event code 6 (KEY_5) Event code 7 (KEY_6) Event code 8 (KEY_7) Event code 9 (KEY_8) Event code 10 (KEY_9) Event code 11 (KEY_0) Event code 113 (KEY_MUTE) Event code 114 (KEY_VOLUMEDOWN) Event code 115 (KEY_VOLUMEUP) Event code 116 (KEY_POWER) Event code 158 (KEY_BACK) Event code 159 (KEY_FORWARD) Event code 164 (KEY_PLAYPAUSE) Event code 373 (KEY_MODE) Event code 410 (KEY_SHUFFLE) Event type 2 (EV_REL) Event code 0 (REL_X) Event code 1 (REL_Y) Event type 4 (EV_MSC) Event code 4 (MSC_SCAN) Key repeat handling: Repeat type 20 (EV_REP) Repeat code 0 (REP_DELAY) Value 400 Repeat code 1 (REP_PERIOD) Value 80 Properties: Property type 5 (INPUT_PROP_POINTING_STICK) Testing ... (interrupt to exit)