feat(file-manager): handle the wheel, double clicks and right clicks #57
Merged
BlackAngelTV
merged 2 commits from 2026-12-03 10:23:11 +01:00
feat/file-manager-mouse into main
No Reviewers
Labels
Clear labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: FWS/FWS-Kitty#57
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
on_mouse_eventonly handledMOUSE_CLICK(row selection) andMOUSE_MOVE(pointer shape); everything else was keyboard-only, so the wheel, double clicks and right clicks did nothing in the panel.The panel now handles:
move_selectionkeeps the selected row visible). The event is consumed by the panel and never reaches the terminal hosting the dock.click_intervaldefault) runsactivate(), i.e. opens the directory in the panel or the file in the editor, exactly likeEnter.::opens.Wheel notches arrive as
MOUSE_PRESSwithMOUSE_WHEEL_UP/DOWN, the same way the diff kitten handles them. Clicks and wheel events are ignored while the palette is open so they cannot change the selection behind it.Changes
kittens/file_manager/main.go: wheel, double-click tracking (click_tracker) and right-click context menu.kittens/file_manager/main_test.go: hit-test with a scrolled list (including a scroll past the end) and double-click detection.docs/kittens/file-manager.rst,docs/changelog.rst: mouse section and changelog entry.Tests
go test ./kittens/file_manager/gofmton the touched filesThe interactions were not exercised in a running terminal: the tests cover the row hit-test with scroll and the click tracker, not the rendered panel.
Fixes #47