Super key intermittently ceases to function on Keychron K4 Pro keyboard when in Bluetooth mode [F40, GNOME Wayland]

Hello. I am experiencing a problem in a fairly fresh Fedora 40 Workstation install. It was also present on F39 prior to updating to F40 today.

The Super key will intermittently fail to function (by itself to bring up the Overview or in custom shortcut for gnome-terminal) when I am using my Keychron K4 Pro keyboard in Bluetooth mode.

My laptop is a ThinkPad T15p Gen 3, and I am not experiencing this problem when I use the same keyboard in wired mode or when I am using the laptop’s own keyboard. I am running GNOME Wayland and as the laptop has a discrete NVIDIA GPU, I have the proprietary NVIDIA drivers from RPMFusion.

The shortcut for viewing the Overview is currently unset in GNOME Settings. GNOME Tweaks is installed but nothing is changed with relation to (left) Super. English (Canada) and English (US) keyboard layouts (as specified in GNOME) both exhibit the problem.

Although the problem seems to appear and disappear somewhat randomly, I have a non-exclusive way to reproduce the problem: opening the Overview and then opening GNOME Settings from the Dash reliably produces this aberrant behavior. (EDIT: It seems that the GNOME Settings window gaining focus is enough to trigger the problem.)

I also have two non-exclusive fixes: Pressing left Alt key sometimes temporarily fixes the problem, and Fn+Super (seemingly intended to be a lock for the Super key in Windows according to keyboard documentation) also temporarily fixes the problem. However, the problem repeats reliably (often in a minute or less) after restoring functionality to the Super key this way. Sometimes spamming Super fixes the problem by itself.

I do not believe this to be a hardware problem as this keyboard worked perfectly well before switching to Fedora and because my keyboard does not appear to have a “game mode” or another feature that would automatically turn off the Super key randomly.

I have attempted a little to isolate the problem to Wayland/ XWayland windows, with no success - even a native Wayland app like GNOME Settings can trigger the problem, and once triggered, the problem will persist even if the focus is on the desktop or the top bar of the GNOME interface.

Disabling extensions and rebooting did not fix the problem.

I have not tried other desktop environments or GNOME Xorg to see if the problem persists there. However, this was not a problem when I was running Arch Linux with the same /home partition for close to two years, in KDE Plasma or in GNOME.

Please assist. Thanks in advance for reading and please let me know if I can provide any other information.

This would seem to indicate that it may have something to do with bluetooth since the same keyboard has no errors when in wired mode. It does not seem to be the keyboard, but probably bluetooth itself that is the problem.

That makes sense. However, I don’t really know how to go about troubleshooting this situation in that case. A cursory search for issues around Bluetooth keyboards generally brings up issues where people cannot get the keyboard to work at all, whereas my problem is curiously much more intermittent and (in a way) transient. Would I find any information in dmesg or journalctl?

Edit: The issue might indeed transcend GNOME. I tried to install Sway (yes, despite NVIDIA), and the Super key also behaves inconsistently under similar circumstances in Sway also.

On another thread I see there is an update in the works for bluez, and maybe it would solve this for you.
sudo dnf --enablerepo=updates-testing upgrade bluez should pull that update in. Follow the update with a reboot and test to see if it assists.

Apologies for the late reply. Resetting the keyboard to factory settings and re-pairing the keyboard fixed the problem in my case, so I did not try enabling the testing repos to update bluez. However, thank you for the suggestion.

If you have updated recently the new bluez version has been released for f39.

$ sudo dnf list bluez
Last metadata expiration check: 0:30:27 ago on Mon 29 Apr 2024 06:07:51 AM CDT.
Installed Packages
bluez.x86_64                                                  5.72-1.fc39                                                   @updates
Available Packages
bluez.x86_64                                                  5.75-1.fc39                                                   updates