This repository is no longer actively maintained on GitHub.
Please update your bookmarks and remotes to the new home on Codeberg:
➡️ https://codeberg.org/alexeygumirov/lofree-flow-fn-fix ⬅️
Thank you for your understanding!
The issue with the Lofree Flow keyboard is that it cannot recognize Linux system correctly. This causes Fn keys behave only like media keys. And it does not allow switching to the Fn mode (Fn + Lock).
Note: You can read about modified parameter here: https://wiki.archlinux.org/title/Apple_Keyboard
This method provides you ability to keep this config persistent on your Linux system. If you use Lofree via USB cable or via Bluetooth connection - this configuration fixes both.
What is needed - to create a file in the /etc/modprobe.d directory and to set Fn mode for the keyboard.
echo "options hid_apple fnmode=2" | sudo tee /etc/modprobe.d/20_lofree_fn_mode_fix.confReboot.
This script fixes issue but only for the current connection. You shall run this script every time you boot your system or connect/reconnect your keyboard.
This script just changes the Fn mode directly in the keyboard parameters file: /sys/module/hid_apple/parameters/fnmode.
- Value 1 means Fn lock is off: default action of the F1, F2, ... keys is media control.
- Value 2 means Fn lock is on: default action of the function keys is a standard function key action (F1, F2...F12). And media control works by pressing Fn + F1, Fn + F2, and so on.
If your keyboard has an ISO layout but is being automatically detected as an ANSI keyboard, then you will also want to change /sys/module/hid_apple/parameters/iso_layout from -1 (Auto) to 1 (ISO).
This will fix some keys such as the less-than key being swapped.
- Download script file:
wget https://raw.githubusercontent.com/alexeygumirov/lofree-flow-fn-fix/main/lofreemodefix - Make it executable
chmod +x lofreemodefix. - Run it:
./lofreemodefix
Or just make your own script file with the same content:
#!/bin/sh
echo "Fixing Lofree Fn Mode"
echo
echo "Please switch keyboard into the MacOS/iOS mode: Press Fn + M"
echo
read -p "Press any key to continue... " PRESSKEY
echo
echo "Setting Lofree Fn Mode to 2"
echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode
echo "Done!"
echo
echo "You can set keyboard back to Windows/Android mode by pressing Fn + N"Make it executable and run it.