调整键盘以适合 HP Omen 15 笔记本电脑

调整键盘以适合 HP Omen 15 笔记本电脑

我购买了 HP Omen 15 笔记本电脑并在其上安装了带有 KDE 的 Ubuntu 20.04。

除键盘的 3 个小问题外,一切正常。

请建议如何修复它们。

  1. Calculator按钮工作时有错误。计算器很少打开。我尝试使用xev命令观察事件,发现按下此按钮有时会产生许多带有XF86Calculator按键的事件,有时会产生任何事件。
  2. Omen按钮根本不起作用。我在论坛上看到过,这是一个坏按钮,仅在 Windows 中受支持。但是,按下它会显示以下消息:dmesg[ 6931.025068] hp_wmi: Unknown event_id - 29 - 0x21a5所以它没有坏,可能,安装正确的驱动程序可能会有所帮助。我了解命令中心仅在 Windows 上受支持,但我可以为其分配其他程序。
  3. delete键盘上的和按钮的位置pause已交换(见附图)。我想重新映射它们,以便按下pause会产生删除键事件,反之亦然。

在此处输入图片描述

以下是输出dmesg | grep input

[    1.080083] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
[    1.080114] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1
[    1.080137] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
[    1.201495] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3
[    1.469199] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:03/LNXVIDEO:00/input/input4
[    1.654595] input: SYNA32A5:00 06CB:CE17 Mouse as /devices/platform/AMDI0010:03/i2c-0/i2c-SYNA32A5:00/0018:06CB:CE17.0001/input/input5
[    1.654751] input: SYNA32A5:00 06CB:CE17 Touchpad as /devices/platform/AMDI0010:03/i2c-0/i2c-SYNA32A5:00/0018:06CB:CE17.0001/input/input6
[    1.654872] hid-generic 0018:06CB:CE17.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA32A5:00 06CB:CE17] on i2c-SYNA32A5:00
[    4.366866] input: HP WMI hotkeys as /devices/virtual/input/input8
[    4.412494] input: HP Wide Vision HD Camera: HP Wi as /devices/pci0000:00/0000:00:08.1/0000:06:00.3/usb3/3-3/3-3:1.0/input/input9
[    4.545854] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card1/input10
[    4.545934] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card1/input11
[    4.546008] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card1/input12
[    4.546088] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card1/input13
[    4.546164] input: HDA NVidia HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card1/input14
[    4.546258] input: HDA NVidia HDMI/DP,pcm=11 as /devices/pci0000:00/0000:00:01.1/0000:01:00.1/sound/card1/input15
[    4.547361] snd_hda_codec_realtek hdaudioC2D0:    inputs:
[    4.550677] input: SYNA32A5:00 06CB:CE17 Mouse as /devices/platform/AMDI0010:03/i2c-0/i2c-SYNA32A5:00/0018:06CB:CE17.0001/input/input16
[    4.551919] input: SYNA32A5:00 06CB:CE17 Touchpad as /devices/platform/AMDI0010:03/i2c-0/i2c-SYNA32A5:00/0018:06CB:CE17.0001/input/input17
[    4.552036] hid-multitouch 0018:06CB:CE17.0001: input,hidraw0: I2C HID v1.00 Mouse [SYNA32A5:00 06CB:CE17] on i2c-SYNA32A5:00
[    4.592745] input: HD-Audio Generic Mic as /devices/pci0000:00/0000:00:08.1/0000:06:00.6/sound/card2/input19
[    4.592837] input: HD-Audio Generic Headphone as /devices/pci0000:00/0000:00:08.1/0000:06:00.6/sound/card2/input20
[  599.371063] input: KYE SYSTEMS CORP. Wired Mouse as /devices/pci0000:00/0000:00:08.1/0000:06:00.4/usb5/5-2/5-2:1.0/0003:0458:0186.0002/input/input21
[  599.371352] hid-generic 0003:0458:0186.0002: input,hidraw1: USB HID v1.11 Mouse [KYE SYSTEMS CORP. Wired Mouse] on usb-0000:06:00.4-2/input0
[  599.371405] usbhid 5-2:1.1: couldn't find an input interrupt endpoint

答案1

  1. 仍在努力Calculator。我已就此提交了单独的问题(HP 笔记本电脑计算器键出现问题)。目前我猜测问题出在 xkb 子系统的某个地方。

    更新:已完成。感谢“无名”的帮助!:) 请参阅上面的链接。

  2. 此存储库包含 HP WMI 的更新驱动程序,可启用四区域键盘突出显示并将Omen按键映射到XF86Launch(6)按键。感谢 James Churchill 的努力!

  3. 交换由具有以下内容的文件Delete完成Pause$HOME/.Xmodmap

    keycode 119 = Pause Break Pause Break
    keycode 127 = Delete NoSymbol Delete
    

    这些指令是使用以下算法确定的。

    1. 使用 确定正确的键码(上面的 119 和 127)showkey -k。运行并按sudo showkey -k。该程序在我的计算机上打印了 的 111 键码和 的 119 键码。DeletePauseDeletePause
    2. 将它们加 8 并放入该文件中。我不确定,但值 8 可能是从 的输出中获得的xmodmap -pk。其输出的第一行在我的 PC 上显示 8,这是最小密钥代码。
    3. 通过运行找出这些键的原始映射xmodmap -pke。例如,Delete我电脑上键的原始映射是
    $ xmodmap -pke | grep 119
    keycode 119 = Delete NoSymbol Delete
    

答案2

作为对你的问题的部分回答,我设法将 HP Omen 15 的暂停和删除键换掉了https://gist.github.com/kellpossible/d2d7992b4aa6b9214577596843d307b6

相关内容