- Notifications
You must be signed in to change notification settings - Fork74
A small script to allow various keyboards to boot up with function keys enabled by default.
License
adam-savard/keyboard-function-keys-linux
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Below, you'll find the steps required to create a systemd command that will run at boot to disable the media keys and restore f1-f12 functionality. Note that these steps have been tested with Keychron keyboards in Windows Mode,not Mac Mode.
Open a terminal window and enter the following command:
# Set the EDITOR variable with EDITOR=nano, uncommenting the line directly below# EDITOR=nanosudoedit /etc/systemd/system/keychron.service
Paste the following into the window:
[Unit]Description=Disable media keys and substitute in function keys[Service]Type=simpleRemainAfterExit=yesExecStart=/bin/bash -c "echo 0 > /sys/module/hid_apple/parameters/fnmode"ExecStop=/bin/bash -c "echo 1 > /sys/module/hid_apple/parameters/fnmode"[Install]WantedBy=multi-user.target
Pressctrl+o
and thenctrl+x
to exit.
In the terminal, type the following:
systemctl enable keychron
That's it! A reboot, and you'll see that the function keys have been re-enabled.Alternatively, run this command to see the changes right away:systemctl start keychron
If you confirm that your keyboard works with this script as expected, create a ticket and I'll add it to the list of user-tested keyboards. Alternatively, submit a PR with a modification to this readme.
- Keychron K2
- Keychron K1 SE
- Keychron K6
- Keychron C2
- Keychron K8
- Ninja87BT
- Keychron K4
- Keychron C1
- Flesports MK870
- Keebmonkey 1800/James Donkey RS2
- Keychron K3E1
If you want to simply drag/drop the file that you create manually in the steps provided, I have it under the scripts folder in this repo. Download it and drop it in/etc/systemd/system/
, doing Step 3 at the end.
About
A small script to allow various keyboards to boot up with function keys enabled by default.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Contributors4
Uh oh!
There was an error while loading.Please reload this page.