Skip to content

Commit dc4ec62

Browse files
committed
til: keychron g5 webhid under linux
1 parent bf94c5e commit dc4ec62

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: "How to fix the Chromium WebHID connection for a Keychron G5 under Linux"
3+
date: 2026-04-28
4+
tags:
5+
- fedora
6+
- udev
7+
- keychron
8+
---
9+
10+
Today my new mouse arrived, a [Keychron G5](https://www.keychron.com/products/keychron-g5-ultra-light-wireless-mouse). I had read that it was supposedly configurable through (Chromium based) browsers via [WebHID](https://developer.mozilla.org/en-US/docs/Web/API/WebHID_API), OS agnostic, so no need to install any weird (bloated) drivers or keep a Windows VM ready. However, when I went to `https://launcher.keychron.com` in my ungoogled Chromium running under Fedora Linux, I had to realize that while it could see the mouse, it would not actually connect to it.
11+
12+
A quick web search later I fell over [this repository](https://github.com/StefanMarAntonsson/keychron-launcher-arch-guide) with a guide on how to get Chromium's WebHID connection to work to a Keychron Q5 HE under ArchLinux, and I figured that was close enough (and the steps outlined therein logical enough) to adapt. And just so I can easily find this again, I'm replicating the crucial bits here...
13+
14+
Apparently all I needed were some additional `udev` rules for both the mouse itself (when connected via the USB-C cable) as well as the 2.4GHz dongle (when connected wirelessly). So, first I figured out the relevant vendor and product IDs:
15+
16+
```
17+
$ lsusb | grep -i keychron
18+
Bus 005 Device 042: ID 3434:d028 Keychron Keychron Ultra-Link 8K
19+
Bus 005 Device 062: ID 3434:d06f Keychron Keychron G5
20+
```
21+
22+
Those turned out to be vendor `0x3434` and products `0xd06f` (wired mouse) and `0xd028` (dongle). So based on the repo linked above I created `/etc/udev/rules.d/50-keychron-g5.rules` as follows:
23+
24+
```
25+
# Keychron G5 (WebHID)
26+
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTR{idVendor}="3434", ATTRS{idProduct}=="d06f", MODE="0666", TAG+="uaccess", TAG+="udev-acl"
27+
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTR{idVendor}="3434", ATTRS{idProduct}=="d028", MODE="0666", TAG+="uaccess", TAG+="udev-acl"
28+
```
29+
30+
then refreshed `udev`:
31+
32+
```
33+
sudo udevadm control --reload-rules
34+
sudo udevadm trigger
35+
```
36+
37+
and replugged the mouse and restarted Chromium.
38+
39+
After that, the launcher page could finally connect! 🥳

0 commit comments

Comments
 (0)