Skip to content

Instantly share code, notes, and snippets.

@speedie1337
Last active January 29, 2022 15:34
Show Gist options
  • Save speedie1337/833db7e8f97c6a4a7fcd61868b5bbc9c to your computer and use it in GitHub Desktop.
Save speedie1337/833db7e8f97c6a4a7fcd61868b5bbc9c to your computer and use it in GitHub Desktop.
Keychron keyboard support in Linux
If you have a Keychron keyboard and you try to use it in Linux, you'll likely find that your function keys do not work properly
or at all. I think this is pretty stupid but it's rather easy to fix.
Open your favorite terminal, cd to /usr/bin and doas/sudo nano keychron and add these two lines
#!/bin/sh
echo 0 > /sys/module/hid_apple/parameters/fnmode
and save the file. Then run doas/sudo chmod +x keychron
Now you'll need to have this run at startup. The way you'll do this will be different depending on what desktop environment
you're using. A good option is to add it to .xinitrc. Simply add "keychron &" to the file but make sure it runs before your
window manager. Otherwise it won't be executed.
I only tested this on Gentoo Linux but it should work on other distros as well, there's not really a reason it wouldn't.
Enjoy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment