Skip to content

Commit 8b96195

Browse files
authored
Update README.md
1 parent bd20b71 commit 8b96195

File tree

1 file changed

+41
-2
lines changed

1 file changed

+41
-2
lines changed

README.md

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,41 @@
1-
# keychron-k2-function-keys-linux
2-
A small script to allow the Keychron K2 Keyboard to boot up with function keys enabled by default.
1+
# Enable Function Keys On The Keychron K2 Mechanical Keyboard Under Linux
2+
3+
4+
Below, you'll find the steps required to create a systemd command that will run at boot to diable the media keys and restor f1-f12 functionality.
5+
6+
## Step 1
7+
8+
Open a terminal window and enter the following command:
9+
10+
`sudo nano /etc/systemd/system/keychron.service`
11+
12+
## Step 2
13+
14+
Paste the following into the window:
15+
16+
```[Unit]
17+
Description=The command to make the Keychron K2 work
18+
19+
[Service]
20+
Type=oneshot
21+
ExecStart=echo 0 | sudo tee /sys/module/hid_apple/parameters/fnmode
22+
23+
[Install]
24+
WantedBy=multi-user.target
25+
```
26+
27+
Press `ctrl+o` and then `ctrl-x` to exit.
28+
29+
## Step 3
30+
31+
In the terminal, type the following:
32+
33+
`systemctl enable keychron`
34+
35+
## Step 4
36+
37+
That's it! A reboot, and you'll see that the function keys have been re-enabled.
38+
39+
## Closing Remarks
40+
41+
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.

0 commit comments

Comments
 (0)