The problem
A common problem faced by GMK67 users when using Linux, is that the fn + 1
key combination which is supposed to produce the output f1
will produce a screen brightness decrease operation. And also, If you were to try and change the physical switch on the GMK67 to Mac mode it will fix the Fn
row. But, it will alter the modifier keys. For example the Super / Win
key will now become the Alt
and the Alt
will become the Super / Win
key.
Solutions
After researching many solutions and multiple failures in solving this issue I was able to solve it. The post I initiallty used. Although the solution in the post itself didn’t work for me personally, one of the comments in the above post helped me solve this issue.
How I solved it.
Open the file
/sys/module/hid_apple/parameters/fnmode
in a text editorReplace it’s value to
0
s.As mentioned in the post the above solution will fix this temporarily.
To make the change permanent do the following:
Open the file
/etc/modprobe.d/hid_apple.conf
in a text editorAdd / Edit this line
Fold code block Copy code1
options hid_apple fnmode=0
Add the
hid_apple.conf
to the configuration ofmkinitcpio
.You can do it by opening
/etc/mkinitcpio.conf
in a text editor.You’ll see a file like:
Add the location of the config file as in
line 19
of the above code.Then, rebuild the initramfs using:
Fold code block Copy code1
sudo mkinitcpio -p linux66
The above steps should help you in enabling you using your Fn row as usual when in
Win mode
of the GMK67 keyboard.Thanks
For your Reference
Recently i bought a zuoya gmk67 keyboard, it doesn't have a function keys row and has a knob for volume control. Unfortunately, if you plug your gmk67 in a archlinux machine you will notice that using
fn+1
will not producef1
as expected, it will produce a screen brightness decrease, and if you change the physical switch in the back for the macOS mode, the function keys now work, but the modifier keys don't, quite stressful.Fear not, you can either alter your system configuration so the keyboard functions normally, as in this gist, or remap the keys, as seen in the gist Using GMK67 keyboard in linux with key remaps!.
For this gist we are going to alter the configuration for the apple hid driver on archlinux, since this keyboard uses it, and alter the functionality of the Fn key.
This is tested on archlinux, for any other distro you might have to figure out yourself the correponding commands!
First write the following file as root:
/etc/modprobe.d/hid_apple.conf
:options hid_apple fnmode=2
Then rebuild the initramfs:
$ sudo mkinitcpio -p linux
And boom, know everything should work as intended, thanks @butterdori for the tip!. More info on the arch wiki:
Recently i bought a zuoya gmk67 keyboard, it doesn't have a function keys row and has a know for volume control. Unfortunately, if you plug your gmk67 in a linux machine you will notice that using
fn+1
will not producef1
as expected, it will produce a screen brightness decrease, and if you change the physical switch in the back for the macOS mode, the function keys now work, but the modifier keys don't, quite stressful.Fear not, you can either remap the keys, as in this gist, or alter your system configuration so the keyboard functions normally, as seen in the gist Using GMK67 keyboard in linux. Function keys not working with Fn!.
For this gist, we can simply remap some keys while the physical switch in the back is in windows mode. For that let's install
keyd
, a remapping tool daemon.For aarch linux use:
$ yay -S keyd
I know you are smart, you can figure how to install on other distros ;)
Then start teh daemon:
$ sudo systemctl enable --now keyd
Create the following file:
/etc/keyd/gmk67.conf
:### # GMK76 remap config file ### [ids] # all interface (BT, USB, 2.4Ghz dongle) k:05ac:024f [main] # Maps capslock to escape when pressed and control when held. # capslock = overload(control, esc) # Remaps the escape key to capslock #esc = capslock brightnessdown = f1 brightnessup = f2 scale = f3 dashboard = f4 kbdillumdown = f5 kbdillumup = f6 previoussong = f7 playpause = f8 nextsong = f9 mute = f10 volumedown = f11 volumeup = f12 # activates nav while held, but a tap is a normal capslock capslock = overload(nav, capslock) [nav] up = pageup down = pagedown left = home right = end [meta] mute = playpause volumedown = volumedown volumeup = volumeup
Then run this command to load the config:
$ sudo keyd reload
And bam, it now works!
This config works by remapping the multimedia events firectly into function keys, furthermore, while doing this the knob will stop working as it will produce function keys instead of the volume control we want, so we bind a key,
meta
, so teh know will emit volume control if we dometa+knob
.In the top we also see a
id
section, this matches the physical vendor id of your device, in this case mine appears as 'Apple, Inc. Aluminium Keyboard (ANSI)'. You can check yours using:$ lsusb
or by using keyd monitor and seeing the vendor id while typing something.
$ sudo systemctl stop keyd $ sudo keyd monitor
- If you dont want to do any of this, just change the id to
*
. This will match all keyboards in your machine
As a bonus i remapped
capslock
to be used as a key modifier for the directional arrows and map them topgup, pgdown, home
andend
respectively- If you dont want to do any of this, just change the id to