REPL: Cannot copy/paste text out of seqr #178

Closed
opened 2026-01-04 18:45:44 +00:00 by navicore · 3 comments
navicore commented 2026-01-04 18:45:44 +00:00 (Migrated from github.com)

Summary

Unable to copy text out of the seqr REPL, possibly related to mouse capture settings.

Current Behavior

  • Cannot select and copy text from the REPL output
  • Standard terminal copy (Cmd+C / Ctrl+Shift+C) doesn't work as expected

Expected Behavior

  • Should be able to copy:
    • REPL history/output
    • Stack dump results
    • Error messages

Possible Causes

  • Mouse capture mode in crossterm/ratatui preventing system selection
  • Terminal raw mode interfering with selection

Investigation Notes

  • Check crossterm::event::EnableMouseCapture usage
  • May need to disable mouse capture or provide a "copy mode"
  • Consider adding explicit copy commands (like tmux's copy mode)

Files to Investigate

  • crates/repl/src/main.rs - terminal setup
  • Any mouse event handling code
## Summary Unable to copy text out of the seqr REPL, possibly related to mouse capture settings. ## Current Behavior - Cannot select and copy text from the REPL output - Standard terminal copy (Cmd+C / Ctrl+Shift+C) doesn't work as expected ## Expected Behavior - Should be able to copy: - REPL history/output - Stack dump results - Error messages ## Possible Causes - Mouse capture mode in crossterm/ratatui preventing system selection - Terminal raw mode interfering with selection ## Investigation Notes - Check `crossterm::event::EnableMouseCapture` usage - May need to disable mouse capture or provide a "copy mode" - Consider adding explicit copy commands (like tmux's copy mode) ## Files to Investigate - `crates/repl/src/main.rs` - terminal setup - Any mouse event handling code
navicore commented 2026-01-04 19:20:34 +00:00 (Migrated from github.com)

Implemented F4 toggle for mouse capture:

Problem: EnableMouseCapture captures all mouse events, preventing native terminal text selection for copy/paste.

Solution:

  • F4 toggles mouse capture on/off
  • When OFF: native terminal selection works for copying text
  • When ON: scroll wheel works in IR pane (default)

Also documented:

  • Most terminals support Shift+Click/Drag to bypass mouse capture for selection (works without F4)

Changes:

  • Added mouse_capture_enabled field to App
  • F4 key handler toggles the flag with status message
  • Main loop sends EnableMouseCapture/DisableMouseCapture when flag changes
  • Updated :help with COPY/PASTE section

Ready for review.

Implemented F4 toggle for mouse capture: **Problem:** `EnableMouseCapture` captures all mouse events, preventing native terminal text selection for copy/paste. **Solution:** - **F4** toggles mouse capture on/off - When OFF: native terminal selection works for copying text - When ON: scroll wheel works in IR pane (default) **Also documented:** - Most terminals support **Shift+Click/Drag** to bypass mouse capture for selection (works without F4) **Changes:** - Added `mouse_capture_enabled` field to App - F4 key handler toggles the flag with status message - Main loop sends `EnableMouseCapture`/`DisableMouseCapture` when flag changes - Updated `:help` with COPY/PASTE section Ready for review.
navicore commented 2026-01-04 19:27:54 +00:00 (Migrated from github.com)

Simplified solution: Removed mouse capture entirely.

Changes:

  • Removed EnableMouseCapture/DisableMouseCapture from terminal setup/teardown
  • Removed mouse event handling from main loop
  • Removed scroll_ir method (was only used by mouse scroll)
  • Kept ir_scroll field for potential future keyboard scrolling

Result: Native terminal text selection now works - select and copy with mouse as usual.

CI passes.

**Simplified solution:** Removed mouse capture entirely. Changes: - Removed `EnableMouseCapture`/`DisableMouseCapture` from terminal setup/teardown - Removed mouse event handling from main loop - Removed `scroll_ir` method (was only used by mouse scroll) - Kept `ir_scroll` field for potential future keyboard scrolling Result: Native terminal text selection now works - select and copy with mouse as usual. CI passes.
navicore commented 2026-01-04 19:31:45 +00:00 (Migrated from github.com)
https://github.com/navicore/patch-seq/pull/183
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
navicore/patch-seq#178
No description provided.