Skip to content

Ghostty left mouse button gets stuck after paste in tcell demo until right-click #1045

@noborus

Description

@noborus

This might be a Ghostty issue, but I'm having trouble when launching the tcell app.

After pasting text in Ghostty, when I launch the tcell mouse demo, the app behaves as if the left mouse button is continuously pressed.
The stuck state is cleared only after a right-click.

This does not happen in gnome-terminal.

Expected behavior

Mouse button state should be clean at startup.
Left button should only be reported as pressed when physically pressed.

Actual behavior

After paste in Ghostty, the app starts with left-click effectively stuck (drag-like behavior), and it remains stuck until one right-click event occurs.

Environment

  • Terminal emulator: Ghostty 1.3.0
  • OS: Linux and macos
  • tcell version: latest main branch (current HEAD)
  • Repro target: _demos/mouse.go

Reproduction steps

  1. Open Ghostty.
  2. Paste any text (clipboard paste).
  3. Launch the tcell mouse demo. go run _demous/mouse.go
  4. Move/click the mouse in the app.
  5. Observe that left-button state appears stuck until right-click once.
    Comparison

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions