Skip to content

Conversation

@Norbert515
Copy link
Owner

Explore options for controlling mouse pointer cursor from TUI apps:

  • OSC 22 escape sequences (Kitty/modern terminals)
  • CGS private APIs for system-wide cursor control (macOS)
  • DECSCUSR for text cursor shape
  • Focus tracking with xterm focus reporting

Includes:

  • docs/mouse_cursor_research.md - comprehensive summary
  • example/cgs_cursor_demo.dart - CGS private API demo
  • example/cgs_cursor_focus_demo.dart - CGS with focus tracking
  • example/cursor_shape_demo.dart - text cursor (DECSCUSR)
  • example/mouse_pointer_demo.dart - OSC 22 demo
  • example/native_cursor_demo.dart - initial FFI exploration
  • test/input/mouse_scroll_exploration_test.dart - mouse behavior tests

Key findings:

  • OSC 22 works in Kitty but not Warp
  • CGS SetsCursorInBackground trick works system-wide
  • Cursor resets on tab switch, needs focus tracking to reapply

Explore options for controlling mouse pointer cursor from TUI apps:

- OSC 22 escape sequences (Kitty/modern terminals)
- CGS private APIs for system-wide cursor control (macOS)
- DECSCUSR for text cursor shape
- Focus tracking with xterm focus reporting

Includes:
- docs/mouse_cursor_research.md - comprehensive summary
- example/cgs_cursor_demo.dart - CGS private API demo
- example/cgs_cursor_focus_demo.dart - CGS with focus tracking
- example/cursor_shape_demo.dart - text cursor (DECSCUSR)
- example/mouse_pointer_demo.dart - OSC 22 demo
- example/native_cursor_demo.dart - initial FFI exploration
- test/input/mouse_scroll_exploration_test.dart - mouse behavior tests

Key findings:
- OSC 22 works in Kitty but not Warp
- CGS SetsCursorInBackground trick works system-wide
- Cursor resets on tab switch, needs focus tracking to reapply
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant