Closed sherpahu closed 5 years ago
Windows 下注册表的方法使用了惠普的 HP System Event Utility 驱动。Linux 内核包含对应的驱动,但在我的电脑上似乎有问题。
请尝试运行sudo dmesg -w
,然后按 OMEN 键。是否有错误信息提示?
有错误信息
[ 497.822211] ACPI Error: Field [D128] at bit offset/length 128/1024 exceeds size of target Buffer (160 bits) (20170831/dsopcode-235)
[ 497.822238] No Local Variables are initialized for Method [HWMC]
[ 497.822243] Initialized Arguments for Method [HWMC]: (2 arguments defined for method invocation)
[ 497.822245] Arg0: 00000000b750981c
这个 INT3400 应该跟按键没有关系,有可能你的机型是驱动支持的(驱动是否已经加载?modprobe hp-wmi)。可以试试 xev, evtest 之类的工具,看桌面环境能不能检测到这个键。如果可以,在桌面环境加快捷键应该能解决。如果检测不到,那就还是驱动问题。
我的电脑上按 OMEN 键会出现 hp-wmi: Bad event 错误,是驱动问题,不太容易解决。
xev我之前试过,没有用,按这个键没有反应 evtest选中hp的键是下面这样 驱动怎么加载?modprobe hp-wmi也没有输出
evtest选中hp的键是下面这样
evtest 需要在桌面环境以外使用(Ctrl+Alt+F2,用 Ctrl+Alt+F7 返回)。
modprobe hp-wmi
这个命令就是加载。看输出,系统已经默认加载了。
现在我也没法确定你的机型上是什么状态。这问题我能想到的办法有:
好吧,谢谢你了。 OMEN键映射的方式还是感觉有点麻烦,我目前的解决方法就是把insert映射为home,delete与end互换,反正insert键基本不用(我目前只会在终端的复制用到insert键,但是ctrl+shift+c也可以实现复制,就没有太大的困扰了),正好这样home键也可以离字母键区更近,输入更方便一点。
What was the solution here?
@hockeymikey Last time I checked, the key is handled by a Linux driver, but the driver has bugs making it unusable. On my system, one possible workaround is to watch the "hp-wmi: Bad event" error and emit Home when the driver writes this line.
I'm not sure what is the status of this driver now. Maybe the bugs have been fixed and the key can be remapped normally. I currently do not have Linux installed.
I find this project remapping omen key with registry , which only works on Windows. So I am wondering whether there is a method to make it work on my Ubuntu system. Thanks in advance! ps. Since that your location showed in Github is China and your id is Chinese Pinyin, I also translate the above issue into Chinese for you. 请问能否在Ubuntu系统上将OMEN键映射为Home?