如何使 MCE IR 遥控器与 mpv 配合使用?

如何使 MCE IR 遥控器与 mpv 配合使用?

我有一个旧的戴尔 MCE 遥控器,我想将其重新用于远程控制mpv

Dell MCE 远程 XPS

我正在运行 Kubuntu 20.04,mpv版本为 0.32 和1.18.0-2build1。我已在中ir-keytable设置。当我测试远程ir-keytablerc6_mce.toml/etc/rc_keymaps ir-keytable -t遥控器的每个按键均正确报告,共45个键。

但是,当我mpv --input-test --force-window --idle再次运行并按下按键时,几乎没有按键被注册:

 input: Key DEL is bound to:
 input: 1.  'script-binding osc/visibility' in <builtin>:1 (default)
 input: Key DEL is bound to:
 input: 1.  'script-binding osc/visibility' in <builtin>:1 (default)
 input: Key ENTER is bound to:
 input: 1.  'playlist-next' in <builtin>:1 (default)
 input: Key RIGHT is bound to:
 input: 1.  'seek  5' in <builtin>:1 (default)
 input: Key LEFT is bound to:
 input: 1.  'seek -5' in <builtin>:1 (default)
 input: Key DOWN is bound to:
 input: 1.  'seek -60' in <builtin>:1 (default)
 input: Key UP is bound to:
 input: 1.  'seek  60' in <builtin>:1 (default)
 input: Key 0x21ff56 is bound to:
 input: (nothing)
 input: Key 0x21ff56 is bound to:
 input: (nothing)
 input: Key 0x21ff32 is bound to:
 input: (nothing)
 input: Key PLAY is bound to:
 input: 1.  'cycle pause' in <builtin>:1 (default)
 input: Key FORWARD is bound to:
 input: 1.  'seek 60' in <builtin>:1 (default)
 input: Key REWIND is bound to:
 input: 1.  'seek -60' in <builtin>:1 (default)
 input: Key CANCEL is bound to:
 input: (nothing)
 input: Key 0x21ff1c is bound to:
 input: (nothing)
 input: Key PAUSE is bound to:
 input: 1.  'cycle pause' in <builtin>:1 (default)

我的input.conf不应该包含任何干扰内容,它也没有在输入测试中引用。为了完整起见:

input.conf

Shift+RIGHT frame-step
Shift+LEFT frame-back-step
R add sub-scale +0.1
Y add sub-scale -0.1
H seek -65
h seek 65
v cycle deband
a cycle audio
s cycle sub
i cycle interpolation
t script-message-to seek_to toggle-seeker
+ add audio-delay 0.010
- add audio-delay -0.010
F1 add sub-delay -0.1
F2 add sub-delay +0.1
F4 cycle-values video-aspect-override "16:9" "4:3" "2.35:1" "-1"

此外,一些键(例如SLEEP、、VOLUME_UPVOLUME_DOWNMUTE会直接传递到操作系统并执行其功能,这可以通过 KDE 弹出窗口看到。(SLEEP虽然只是将我注销)。

总结一下:即使在尝试输入测试时,遥控器上的 4 个键也会对系统起作用,4 个键只显示一个键码(不同于ir-keytable),尽管可以ir-keytable完美识别它们,并且在 的输入测试中只注册了 11 个键mpv。一个键(DEL)似乎被分配给了遥控器上的两个键。

此外,当我尝试从遥控器添加未分配的键到时input.conf,运行mpv会出现错误:

[input] Unknown key 'KEY_NEXT' at /etc/mpv/input.conf:17
[input] Unknown key 'KEY_PREVIOUS' at /etc/mpv/input.conf:18

似乎缺少了一些东西来让其mpv识别正确设置的红外遥控器ir-keytable

我需要做什么才能正确分配按键和mpv操作?

相关内容