Bug: Keyboard input gets "stuck" when toggling Guake via GNOME keyboard shortcut on Wayland
- Dominant language
- Python
- Stars
- 4.7k
- Forks
- 604
- PR merge metrics
- No merged PRs in 30d
Description
# 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
1. Set up a GNOME keyboard shortcut for `guake-toggle` (tested with `t`, `t`, `e` and `t`)
2. Press the keyboard shortcut to toggle Guake
3. Observe that the last key pressed (e.g., 't') starts repeating indefinitely
4. 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:
```bash
#!/bin/bash
sleep 0.1
guake-toggle
```
## Analysis
This appears to be an interaction bug between:
1. GNOME's keyboard shortcut handler
2. Guake's window management (override-redirect window)
3. 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:
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.