Skip to content

Bug: Keyboard input gets "stuck" when toggling Guake via GNOME keyboard shortcut on Wayland #2297

@outofculture

Description

@outofculture

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 <Control><Super>t, <Control>t, <Super>e and <Super>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:

#!/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: <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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions