Function key does not work

Hello all,

My PC has both Windows 11 and Manjaro installation. I used Windows 11 for entertainment and Manjaro mainly for my work. On Windows 11, there is nothing wrong, I can see that it can detect the function key (F1 to F12) of my keyboard; however, on Manjaro, it does not. I am a programmer, thus the function keys are quite important for me to operate with the IDE. When I use key-test dot ru to test the event, F3 and F4 show the mouse left click event, while F11/F22 is for the volume adjustment and F10 for the volume on/off toggle.

On my mechanical keyboard, pressing Fn + Esc is for resetting the keyboard and I did reset it a few times to the factory setting. I installed xev and this is the printout for F1 through my keyboard

FocusOut event, serial 43, synthetic NO, window 0x6200001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 43, synthetic NO, window 0x6200001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 43, synthetic NO, window 0x0,
    keys:  73  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

Do you guys have any idea how to fix this? This is my Manjaro current settings

  • OS: Manjaro Linux x86_64
  • Host: Venus series 1.0
  • Kernel: 6.6.26-1-MANJARO
  • Shell: zsh 5.9
  • DE: Xfce 4.18
  • WM: Xfwm4

Have you checked the bios of the minipc? You can enter it from the grub menu too (hit esc or shift at the beginning of booting).
Or if it is some programmable keyboard, its manual and settings and firmware.

Seems like the top row is combined F + other functions like on laptops, my lenovo has a setting for this in the bios. Also there might be a key combo to lock the state into F mode and disable media keys etc.

1 Like

Thank you for the suggestion. I thought about the same thing but then because my Windows can work normally with the keyboard, thus I eliminated the BIOS settings check from my list. Let me have a look at it then

Your system has inverted your function keys.

Press the Fn and the relevant F-key to get the inverted result.

This option to set configure for F-key or the associated function - e.g. vol-up and vol-down is mostly seen with laptops. The preference can usually be set in firmware - and changed by software.

Some ThinkPads uses FnEsc to changee primary function for F-keys.

What specifically causes this on your system is impossible to say - one thought is your Windows is not shutdown cleanly thus an inverted function is written to ACPI - and when LInux reads the ACPI table - it gets the values stored by Windows - but that is just a thought.

1 Like

Another example (for HP): Fn+F12 will perform this toggle. Again, the default toggle state can be defined in BIOS.

Hey mate, thank a lot for your reply. I could not find the BIOS settings for the keyboard, maybe because I am using a mini PC at this moment (Minisforum UM690 Pro).

One thing to note is that to boot into the BIOS setting, I have to press F7 from the keyboard, as in the function keys work normally before booting into Manjaro. Feel like this is the problem of Manjaro itself

If you are not using a laptop then there is no settings for inverting F-keys.

Manjaro Linux does not change function keys.

If you are using a keyboard with alternative functionality for F-keys - e.g. a gaming keyboard or another fancy keyboard - there may be software - to change the F-keys - and such software may not be available for Linux.

One fresh example was my own mistake of buying DasKeyboard 5 - only to have to return it because it used software which were not available for Linux.

My previous keyboard was the first Xtrfy keyboard - where F-keys was programmable - macros and what not - those are programmed using specially assigned keys - and extra keys for the purpose.

with that said - I am 100% sure - this is not a Manjaro issue - but an issue with your chosen keyboard and your local configuration.

I guess you can try remapping keys with some config files (have not done it personally, cannot guide).
But the real issue is the keyboard itself. If it is programmable you have to see how to program it. Maybe there is some windows software for the settings and the kbd remembers it? So in that case just connect to windows (or wine, or bart pe), change the settings and this might fix it.

What is the model of the keyboard?

Thank Teo. It is Infi75 from Infiverse. You can search for the unboxing video on Reddit. I am trying to find another keyboard to test out whether it is the problem with this keyboard or not

Just as i thought. It’s programmable and has a driver for windows. There is probably a way to program it under linux too, but at least on quick search i only find the windows software. Connect with a cable and check it up on a windows machine, or for example make a ventoy flash drive with hirens bootable win. And try to program it one time that way.

1 Like

thank you for narrowing it down. There was the same issue with the Nuphy 75 that I can easily find on reddit with your suggestion. I will check it out soon after the office hour

Ventoy information, if needed:

Boot with a Ventoy USB, and ISO files are automatically listed in the Ventoy menu, and can be booted directly. A 32GB (minimum) capacity USB should allow ample space to store several ISOs of your choice.

Ventoy is available from the official Manjaro extra repository:

sudo pacman -S ventoy

Type ventoy (without arguments) to see usage information:

Usage: CMD [ OPTION ] /dev/sdX  
  -i  install Ventoy to sdX (fails if disk already installed with Ventoy)  
  -I  force install Ventoy to sdX (no matter if installed or not)  
  -u  update Ventoy in sdX  
  -l  list Ventoy information in sdX  
 OPTION: (optional)  
  -r SIZE_MB  preserve some space at the bottom of the disk (only for install)  
  -s/-S       enable/disable secure boot support (default is enabled)  
  -g          use GPT partition style, default is MBR (only for install)  
  -L          Label of the 1st exfat partition (default is Ventoy)  
  -n          try non-destructive installation (only for install)

Write the Ventoy system to an empty USB drive;
use /dev/sdX to target the device itself, and not a partition:

sudo sh ventoy -i -r 100 -S -g -L VOLUME /dev/sdX
  • Substitute VOLUME for a volume label name to use.
  • Substitute /dev/sdX for the location of your USB device.
  • Preserve some space on the target device (example allows 100mb).

See also: Ventoy (GitHub)

1 Like

I put the solution here in case anyone else has the same issue.

#Enable FN keys
echo -n 0 | sudo tee /sys/module/hid_apple/parameters/fnmode 

#Disable/Return to default
echo -n 1 | sudo tee /sys/module/hid_apple/parameters/fnmode

To make it work after the reboot, optionally do steps above, then do:

echo 'options hid_apple fnmode=0' | \
    sudo tee -a /etc/modprobe.d/hid_apple.conf

(Credit to poolpog on reddit from the post about problem with Nuphy keyboard and Ubuntu

My settings was 3 instead of 1. After set it to 0 and start/stop the keyboard, everything works perfectly

That is not an Apple device - I am confused

Didn’t you think it important to mention it was an apple keyboard ?

1 Like

I am confused too, since my keyboard is in Window mode at this moment, but then after the changes thing starts to work, thus I will try to save my time instead of digging deeper into this. You can check out the post at /r/MechanicalKeyboards/comments/tgjvp2/nuphy_air75_on_linux_issues_with_fn/

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.