Keyboard input gets "stuck" when toggling Guake via GNOME keyboard shortcut on Wayland
System Information
- OS: Arch Linux
- Desktop: GNOME on Wayland
- Kernel: 6.17.5-arch1-1
- Recent updates: kernel, libinput, evdev packages (~300 packages total)
Bug Description
When triggering guake-toggle via a GNOME keyboard shortcut, the last key pressed gets "stuck" in a repeating state, flooding the input until another key is pressed. Additionally, mouse clicks intermittently fail to register after triggering this bug.
Steps to Reproduce
- Set up a GNOME keyboard shortcut for
guake-toggle (tested with <Control><Super>t, <Control>t, <Super>e and <Super>t)
- Press the keyboard shortcut to toggle Guake
- Observe that the last key pressed (e.g., 't') starts repeating indefinitely
- The repeating stops when another key is pressed
Expected Behavior
Guake should toggle without any keys getting stuck or repeating.
Actual Behavior
- The last key in the shortcut combination gets stuck repeating
- libinput debug shows invalid keycodes:
*** (-1) pressed
- Mouse clicks become unreliable until the issue is resolved
Additional Information
When the bug does NOT occur:
- Running
guake-toggle directly from terminal
- Using keyboard shortcuts bound to other commands (tested with
true)
- Switching to Guake via other methods
Debug Output
From sudo libinput debug-events (I don't know if this matters):
event3 KEYBOARD_KEY +4.843s *** (-1) pressed
event3 KEYBOARD_KEY +4.845s KEY_LEFTMETA (125) pressed
event3 KEYBOARD_KEY +5.000s *** (-1) pressed
event3 KEYBOARD_KEY +5.078s *** (-1) released
ttttttttttttttttttttttttttttttttttttttttttttttttttttttt
From evtest, the kernel events appear normal, suggesting the issue is in libinput or the compositor layer.
Workaround
Creating a wrapper script with a small delay prevents the issue:
#!/bin/bash
sleep 0.1
guake-toggle
Analysis
This appears to be an interaction bug between:
- GNOME's keyboard shortcut handler
- Guake's window management (override-redirect window)
- Wayland's input handling
When Guake is toggled via keyboard shortcut, the input focus state isn't properly restored, causing the compositor to believe the last key is still pressed.
Environment
- GNOME Shell version: GNOME Shell 49.1
- libinput version: libinput 1.29.2-1
$ guake --support
Guake Version: 3.11.dev0
Vte Version: 0.82.1
Vte Runtime Version: 0.82.1
GTK+ Version: 3.24.51
GDK Backend: <GdkX11.X11Display
Desktop Session: gnome
Display: :0
RGBA visual: True
Composited: True
- Monitor: 0 - eDP-1
- Geometry: 1920 x 1200 at 0, 0
- Size: 340 x 220 mm²
- Primary: True
- Refresh rate: 143.887 Hz
- Subpixel layout: unknown
Keyboard input gets "stuck" when toggling Guake via GNOME keyboard shortcut on Wayland
System Information
Bug Description
When triggering guake-toggle via a GNOME keyboard shortcut, the last key pressed gets "stuck" in a repeating state, flooding the input until another key is pressed. Additionally, mouse clicks intermittently fail to register after triggering this bug.
Steps to Reproduce
guake-toggle(tested with<Control><Super>t,<Control>t,<Super>eand<Super>t)Expected Behavior
Guake should toggle without any keys getting stuck or repeating.
Actual Behavior
*** (-1) pressedAdditional Information
When the bug does NOT occur:
guake-toggledirectly from terminaltrue)Debug Output
From
sudo libinput debug-events(I don't know if this matters):From
evtest, the kernel events appear normal, suggesting the issue is in libinput or the compositor layer.Workaround
Creating a wrapper script with a small delay prevents the issue:
#!/bin/bash sleep 0.1 guake-toggleAnalysis
This appears to be an interaction bug between:
When Guake is toggled via keyboard shortcut, the input focus state isn't properly restored, causing the compositor to believe the last key is still pressed.
Environment
$ guake --support
Guake Version: 3.11.dev0
Vte Version: 0.82.1
Vte Runtime Version: 0.82.1
GTK+ Version: 3.24.51
GDK Backend: <GdkX11.X11Display
Desktop Session: gnome
Display: :0
RGBA visual: True
Composited: True