Coder Social home page Coder Social logo

vinkmr / keychron-k2-k4-function-keys-linux Goto Github PK

View Code? Open in Web Editor NEW

This project forked from diolinux/keychron-k2-k4-function-keys-linux

0.0 0.0 0.0 14 KB

A small script to allow the Keychron K2/K4 Keyboard to boot up with function keys enabled by default.

License: MIT License

keychron-k2-k4-function-keys-linux's Introduction

Enable Function Keys On The Keychron K2/K4 Mechanical Keyboard Under Linux

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.

Step 1

Open a terminal window and enter the following command:

sudo nano /etc/systemd/system/keychron.service

Step 2

Paste the following into the window:

[Unit]
Description=The command to make the Keychron K2-k4 work with Function keys

[Service]
Type=oneshot
ExecStart=/bin/bash -c "echo 0 > /sys/module/hid_apple/parameters/fnmode"

[Install]
WantedBy=multi-user.target

Press ctrl+o and then ctrl+x to exit.

Step 3

In the terminal, type the following:

sudo systemctl enable keychron

Step 4

That's it! A reboot, and you'll see that the function keys have been re-enabled.

Tips

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.

Your keyboard renponds now first for the F1-F12 Keys, using Fn you can access the multimedia keys as well.

If you are using a model without the "PrintScreen Key", you can use it by pressing Fn+PgUp for about 4 seconds, than this key will turn into your "PrintScreen Key", if you want to revert to "PageUp", just repeat the process by holding Fn+PgUp for about 4 seconds again.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.