I have a Keychron K8 keyboard. I like this keyboard so much! If you have a Keychron keyboard you noticed that in Linux when you press e.g. F2 key in order to change name of some file you adjust brightness (in my case). Default behavior of these keyboards is multimedia keys in function keys.
The second problem I noticed: reconnection takes very long time. I had to try many times to connect after disconnect. It was so frustrating...
So I found a solution in these two articles:
Mike resolved problem with function keys in Keychron keyboard.
Set the keyboard to Windows mode via the side switch
Use
Fn + X + L
(hold for 4 seconds) to set the function key row to "Function" mode. (usually all that's necessary on Windows)type
echo 0 | sudo tee /sys/module/hid_apple/parameters/fnmode
in terminal
Andre resolved problem with slow reconnection via Bluetooth:
- Edit the file
/etc/bluetooth/main.conf
- Uncomment FastConnectable config and set it to true:
FastConnectable = true
- Uncomment
ReconnectAttempts=7
(set the value to whatever number that you want) - Uncomment
ReconnectIntervals=1, 2, 3
What I did additionally was creating autostart above commands when my system is starting up.
- Create a file '/opt/my_scripts/keychron.sh'
#!/bin/sh
#sleep 20
echo 0 | tee /sys/module/hid_apple/parameters/fnmode
exit 0
Notice there is no sudo
in this file!!!
Make this file executable by typing
sudo chmod a+x /opt/my_scripts/keychron.sh
Create a service file:
sudo touch /etc/systemd/system/keychron.service
Edit this file
sudo xed /etc/systemd/system/keychron.service
and paste it:
[Unit]
Description="Keychron service"
[Service]
ExecStart=/opt/my_scripts/keychron.sh
Restart=on-failure
RemainAfterExit=true
[Install]
WantedBy=multi-user.target
Start this service
sudo systemctl start keychron
Make it lauch automatically upon booting
sudo systemctl enable keychron
That's it. From now when I boot my system my function keys are working not in "multimedia mode" and Bluetooth reconnection is very, very fast.
Top comments (0)