Below are the steps to enable Keychron K2 keyboard functions (fn f1-f12 and multimedia keys) on linux (Manjaro Arch linux in my case)
Open terminal and run command below to create the keychron service file:
sudo nano /etc/systemd/system/keychron.service
Paste the following into the file:
[Unit]
Description=The command to make the Keychron K2 work
[Service]
Type=oneshot
ExecStart=/bin/bash -c "echo 0 > /sys/module/hid_apple/parameters/fnmode"
[Install]
WantedBy=multi-user.target
Press ctrl+s
and then ctrl+x
to save and exit
On terminal, run this commands:
systemctl enable keychron && systemctl start keychron
Use the keyboard on Windows mode. That`s it! On reboot this command always will be executed