Skip to content

Instantly share code, notes, and snippets.

@Yemolai
Last active May 27, 2021 22:55
Show Gist options
  • Save Yemolai/85a2ddab7b965f5f718965b58d0b61c5 to your computer and use it in GitHub Desktop.
Save Yemolai/85a2ddab7b965f5f718965b58d0b61c5 to your computer and use it in GitHub Desktop.

When using a Keychron K1 keyboard on Ubuntu 20.10 I found that the Fn keys would not work even switching the fn for the multimedia ones, so I've found that this command can solve this issue:

I managed to get this bug fixed in Ubuntu 20.04 by following this launchpad bug thread. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1814481

Also make sure to get the latest firmware update via windows/mac

Tldr: user Eferox provided the following console command fix

echo 0 | sudo tee /sys/module/hid_apple/parameters/fnmode

from a Reddit question comment about this: https://www.reddit.com/r/Keychron/comments/gptnpt/k1_no_access_to_fkeys_in_linux_help/

As me and @bellesamways noticed, this is reset on startup so, to make this work seamlessly we need to have a way to run this on startup.

I've found that adding the script in the /atc/rc.local would do the trick in the Ubuntu 20.10 Groovy Gorilla. So, pretty simple, as superuser you can run this to create the file if it not exists and append the script into it:

touch /etc/rc.local &&\
chmod +x /etc/rc.local &&\
echo -e "#! /bin/bash\n\
echo 0 | sudo tee /sys/module/hid_apple/parameters/fnmode\n\
exit 0" >> /etc/rc.local

You should double check if this file does not have content prior to this change, if it does, just add the line before the exit 0 and you should be good to go. This worked well for me but you can use other ways to make this run in the system init too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment