我有一个新的 Keychron Q1 键盘。像许多用户一样,我发现功能键在我的 Ubuntu 20.04 工作站上无法正常工作。标准修复方法是设置/sys/module/hid_apple/parameters/fnmode
。我的问题是,无论我将键盘设置为apple
或windows
模式,hid_apple
驱动程序都不会加载,它似乎正在使用hid_generic
。
除非情况发生变化,否则据我所知,无论在哪种模式下,此键盘在 Linux 上都应该显示为苹果键盘。如何确保加载了“正确的”驱动程序?
~$ sudo dmesg | grep usb
[ 941.739948] usb 1-2: USB disconnect, device number 3
[ 946.345384] usb 1-2: new full-speed USB device number 10 using xhci_hcd
[ 946.495146] usb 1-2: New USB device found, idVendor=3434, idProduct=0100, bcdDevice= 1.04
[ 946.495151] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 946.495155] usb 1-2: Product: Keychron Q1
[ 946.495157] usb 1-2: Manufacturer: Keychron
[ 946.498648] input: Keychron Keychron Q1 as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:3434:0100.0007/input/input23
[ 946.558066] hid-generic 0003:3434:0100.0007: input,hidraw1: USB HID v1.11 Keyboard [Keychron Keychron Q1] on usb-0000:00:14.0-2/input0
[ 946.559356] hid-generic 0003:3434:0100.0008: hiddev0,hidraw2: USB HID v1.11 Device [Keychron Keychron Q1] on usb-0000:00:14.0-2/input1
[ 946.561226] input: Keychron Keychron Q1 System Control as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:3434:0100.0009/input/input24
[ 946.617720] input: Keychron Keychron Q1 Consumer Control as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:3434:0100.0009/input/input25
[ 946.618016] input: Keychron Keychron Q1 Keyboard as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.2/0003:3434:0100.0009/input/input26
[ 946.618684] hid-generic 0003:3434:0100.0009: input,hidraw3: USB HID v1.11 Keyboard [Keychron Keychron Q1] on usb-0000:00:14.0-2/input2
答案1
我希望这会有所帮助,请在您的终端中按照以下命令操作
解决方案 1:在 /etc/modprobe.d/hid_apple.conf 中添加“options hid_apple fnmode=2”
sudo nano /etc/modprobe.d/hid_apple.conf
options hid_apple fnmode=2
如果这不起作用,你可以尝试其他解决方案,包括,
sudoedit /etc/systemd/system/keychron.service
然后粘贴以下内容:
Description=Disables media keys for the Keychron K2 and enables function keys
[Service]
Type=oneshot
ExecStart=/bin/bash -c "echo 0 > /sys/module/hid_apple/parameters/fnmode"
[Install]
WantedBy=multi-user.target
systemctl enable keychron
systemctl start keychron
来源 :https://github.com/adam-savard/keychron-k2-function-keys-linux
作者: Adam Savard
Ubuntu 官方支持:
https://help.ubuntu.com/community/AppleKeyboard
可以在 keychron 的 linux facebook 群组中找到替代解决方案,具体请参见其用户手册