REPL: Replace swipe gestures with keyboard shortcuts for IR panes #180

Closed
opened 2026-01-04 18:46:28 +00:00 by navicore · 2 comments
navicore commented 2026-01-04 18:46:28 +00:00 (Migrated from github.com)

Summary

The swipe gesture activation for IR panes in seqr is too fussy/unreliable. Replace with keyboard shortcuts.

Current Behavior

  • Swipe right: opens IR pane, cycles through views
  • Swipe left: cycles back, closes pane
  • Gesture detection is inconsistent and frustrating

Proposed Solution

Use Alt+number scheme (or similar) for direct access:

Option A: Alt+Number

  • Alt+1 - Toggle Stack Effects view
  • Alt+2 - Toggle Typed AST view
  • Alt+3 - Toggle LLVM IR view
  • Alt+0 - Hide IR pane

Option B: Function Keys

  • F1 - Stack Effects
  • F2 - Typed AST
  • F3 - LLVM IR
  • Esc - Hide

Option C: Ctrl+I prefix

  • Ctrl+I, s - Stack Effects
  • Ctrl+I, a - AST
  • Ctrl+I, l - LLVM IR
  • Ctrl+I, Ctrl+I - Toggle visibility

Considerations

  • Keep Ctrl+N for cycling (already works)
  • Remove swipe gesture code entirely, or keep as secondary
  • Update :help output with new shortcuts

Files to Modify

  • crates/repl/src/app.rs - key handling, remove swipe logic
  • crates/repl/src/keys.rs - if needed for key mapping
## Summary The swipe gesture activation for IR panes in seqr is too fussy/unreliable. Replace with keyboard shortcuts. ## Current Behavior - Swipe right: opens IR pane, cycles through views - Swipe left: cycles back, closes pane - Gesture detection is inconsistent and frustrating ## Proposed Solution Use Alt+number scheme (or similar) for direct access: ### Option A: Alt+Number - `Alt+1` - Toggle Stack Effects view - `Alt+2` - Toggle Typed AST view - `Alt+3` - Toggle LLVM IR view - `Alt+0` - Hide IR pane ### Option B: Function Keys - `F1` - Stack Effects - `F2` - Typed AST - `F3` - LLVM IR - `Esc` - Hide ### Option C: Ctrl+I prefix - `Ctrl+I, s` - Stack Effects - `Ctrl+I, a` - AST - `Ctrl+I, l` - LLVM IR - `Ctrl+I, Ctrl+I` - Toggle visibility ## Considerations - Keep `Ctrl+N` for cycling (already works) - Remove swipe gesture code entirely, or keep as secondary - Update `:help` output with new shortcuts ## Files to Modify - `crates/repl/src/app.rs` - key handling, remove swipe logic - `crates/repl/src/keys.rs` - if needed for key mapping
navicore commented 2026-01-04 18:58:06 +00:00 (Migrated from github.com)

Implemented function key toggles:

  • F1 - Toggle Stack Effects view
  • F2 - Toggle Typed AST view
  • F3 - Toggle LLVM IR view

Behavior:

  • Press once → show that view
  • Press same key again → hide pane
  • Press different key → switch to that view

Changes:

  • Added toggle_ir_view() method in app.rs
  • F1/F2/F3 handling in handle_key()
  • Removed swipe_right(), swipe_left() methods
  • Removed swipe_accumulator field
  • Removed mouse swipe handling from main.rs
  • Updated :help to show F1/F2/F3 shortcuts

Ready for review.

Implemented function key toggles: - **F1** - Toggle Stack Effects view - **F2** - Toggle Typed AST view - **F3** - Toggle LLVM IR view Behavior: - Press once → show that view - Press same key again → hide pane - Press different key → switch to that view Changes: - Added `toggle_ir_view()` method in `app.rs` - F1/F2/F3 handling in `handle_key()` - Removed `swipe_right()`, `swipe_left()` methods - Removed `swipe_accumulator` field - Removed mouse swipe handling from `main.rs` - Updated `:help` to show F1/F2/F3 shortcuts Ready for review.
navicore commented 2026-01-04 18:59:41 +00:00 (Migrated from github.com)
https://github.com/navicore/patch-seq/pull/182
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#180
No description provided.