Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A small script to allow various keyboards to boot up with function keys enabled by default.

License

NotificationsYou must be signed in to change notification settings

adam-savard/keyboard-function-keys-linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 

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.

Step 1

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

Step 2

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.

Step 3

In the terminal, type the following:

systemctl enable keychron

Step 4

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

Contributing

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.

User Tested Keyboards

Closing Remarks

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

Stars

Watchers

Forks

Packages

No packages published

Contributors4

  •  
  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp