Last active
August 5, 2023 11:13
-
-
Save anddam/02b35522168d8010c1c08574dbfbefde to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/udev/rules.d/80-keychron.rules | |
SUBSYSTEMS=="input", ATTRS{name}=="Keychron K2", RUN+="/usr/bin/touch /tmp/FOUNDKEYBOARD; /bin/echo 2 | /usr/bin/tee /sys/module/hid_apple/parameters/fnmode" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 6182.981545] usb 1-6.2: USB disconnect, device number 16 | |
[ 6192.677898] usb 1-6.2: new full-speed USB device number 28 using xhci_hcd | |
[ 6192.780651] usb 1-6.2: New USB device found, idVendor=05ac, idProduct=024f | |
[ 6192.780660] usb 1-6.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 | |
[ 6192.780665] usb 1-6.2: Product: USB DEVICE | |
[ 6192.780670] usb 1-6.2: Manufacturer: USB Keychron K2 | |
[ 6192.783537] input: USB Keychron K2 USB DEVICE as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0/0003:05AC:024F.0005/input/input21 | |
[ 6192.843147] apple 0003:05AC:024F.0005: input,hidraw2: USB HID v1.11 Keyboard [USB Keychron K2 USB DEVICE] on usb-0000:00:14.0-6.2/input0 | |
[ 6192.844870] input: USB Keychron K2 USB DEVICE as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.1/0003:05AC:024F.0006/input/input22 | |
[ 6192.902593] apple 0003:05AC:024F.0006: input,hidraw3: USB HID v1.11 Keyboard [USB Keychron K2 USB DEVICE] on usb-0000:00:14.0-6.2/input1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've found out that
Keychron K8
also needs this. But enumerating every possible K* sounds unreasonable. Myudevadm
outputs:And it seems like
idVendor
andidProduct
are the same in K2 and K8. This hints me that it should be possible to make the rule universal matching any Keychron keyboard by replacing