Oh I see. The hardware is switching between the same key meaning KEY_PREVIOUSSONG or KEY_F4. So I think when the bug occurs it must be after KEY_F4 went down and never came up before the hardware switched to KEY_PREVIOUSSONG mode. Or the hardware switched Fn-lock so even if the F4 key was released, it's no longer known as F4 when released. So in software the F4 key is believed to be stuck down.
This might be difficult to solve in software because KEY_PREVIOUSSONG is not always on the F4 key. It could be elsewhere on the keyboard so we can't just pretend they are the same key. Unless there's a simple logic error in Mutter, I think this would need to be solved with a hardware quirk in the kernel. ** Package changed: ubuntu => linux-hwe (Ubuntu) ** Changed in: linux-hwe (Ubuntu) Status: Incomplete => New ** Package changed: linux-hwe (Ubuntu) => linux (Ubuntu) ** Also affects: mutter (Ubuntu) Importance: Undecided Status: New ** Changed in: mutter (Ubuntu) Status: New => Opinion ** Summary changed: - "Repeat keys" causes `ctrl` and `alt` keys to misbehave + [Dell XPS 15 9570] F4 key action repeats even when not held down -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to mutter in Ubuntu. https://bugs.launchpad.net/bugs/2112439 Title: [Dell XPS 15 9570] F4 key action repeats even when not held down Status in GNOME Shell: Fix Released Status in linux package in Ubuntu: New Status in mutter package in Ubuntu: Opinion Bug description: ### Affected version - Device: Laptop Dell Inc. XPS 15 9570 - OS: Ubuntu 24.04.2 - Gnome Shell: 46 - Windowing system: Wayland - Issue happens without extensions: Maybe? Is hard to reproduce, more details later. ### Bug summary At times when focusing a [Brave browser](https://brave.com) or [Ungoogled Chormium](https://github.com/ungoogled-software/ungoogled-chromium), the `ctrl` and `alt` keys behave weirdly: - Hitting `ctrl` causes the current tab to close - Hitting `alt` causes the whole window to close, if multiple tabs are open the dialog to close multiple tabs show up. VSCode can also behave weirdly, if the console is active it may print the `^[OS` control character. Important things to point out - The behavior happens after an initial unknown trigger and then switching the focus of a window via the Activities view. - Hitting `tab` fixed the issue, until you switch focus again via the Activities view. - It happens only in the laptop keyboard, external keyboards do not show this behavior. - Disabling "Repeat Keys" makes the issue go away, until it gets reenabled. ### Steps to reproduce 1. An unknown trigger that I haven't been able to nail down 2. Open a terminal window via a a custom keyboard shortcut 3. Switch to workspace 2 via keyboard shortcuts 4. Open a terminal window via a a custom keyboard shortcut 5. Switch back to workspace 1 via keyboard shortcuts 6. Focus Brave browser 7. Hit `ctrl` or `alt` keys ### What happened The `ctrl` or `alt` keys do not behave as expected ### What did you expect to happen For the `ctrl` and `alt` keys to not change behavior ### Relevant logs, screenshots, screencasts etc. - [Gnome Shell issue](https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/8443) - [Bug opened with the Brave team](https://community.brave.com/t/brave-on-linux-sometimes-closes-windows-with-alt-and-tabs-with-ctrl/620892/11) - [Very similar issue on Mutter](https://gitlab.gnome.org/GNOME/mutter/-/issues/1066) - [Reddit thread](https://www.reddit.com/r/Ubuntu/comments/14tsrur/pressing_ctrl_closes_browser_tab_in_ubuntu_2304/) - [This comment is the exact same issue](https://www.reddit.com/r/Ubuntu/comments/14tsrur/comment/kpiiiye/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button) - [Thread on AskUbuntu with the disable "Repeat Keys" workaround](https://askubuntu.com/questions/1497058/ubuntu-23-10-pressing-alt-key-closes-window-abruptly/1532813) ProblemType: Bug DistroRelease: Ubuntu 24.04 Package: gnome-shell 46.0-0ubuntu6~24.04.9 ProcVersionSignature: Ubuntu 6.8.0-60.63-generic 6.8.12 Uname: Linux 6.8.0-60-generic x86_64 NonfreeKernelModules: nvidia_modeset nvidia ApportVersion: 2.28.1-0ubuntu3.6 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: ubuntu:GNOME Date: Wed Jun 4 00:16:22 2025 DisplayManager: gdm3 InstallationDate: Installed on 2023-03-06 (821 days ago) InstallationMedia: Ubuntu 22.04.2 LTS "Jammy Jellyfish" - Release amd64 (20230223) ProcEnviron: LANG=en_US.UTF-8 PATH=(custom, no user) SHELL=/bin/bash XDG_RUNTIME_DIR=<set> RelatedPackageVersions: mutter-common 46.2-1ubuntu0.24.04.8 SourcePackage: gnome-shell UpgradeStatus: Upgraded to noble on 2024-09-02 (275 days ago) To manage notifications about this bug go to: https://bugs.launchpad.net/gnome-shell/+bug/2112439/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp