-
Notifications
You must be signed in to change notification settings - Fork 316
Closed
Labels
Description
Originally posted here: PowerShell/PowerShell#14247
It was recommended to move this to PSReadLine.
Description of the new feature/enhancement
Whereas:
- Both tmux and PowerShell are terminal-based applications
- tmux supports mouse events, such as click-and-drag to resize panes, select a window, and scroll through history
- PowerShell scripts could benefit from mouse interactions
Proposed technical implementation details (optional)
This might be implemented using a PowerShell "engine event."
Right-Click Event
The right-click event should include event data that describes the terminal coordinates of the click event.
Register-EngineEvent -Action { Draw-ContextMenu -At $event.Coordinates } -SourceIdentifier [System.Management.Automation.PsEngineEvent]::RightClick
Scroll Event
The scroll up/down event should include event data about the speed / length / height (???) of the scroll.
Example
Register-EngineEvent -Action { GrabAndDisplay-SomeHistoricalLogData } -SourceIdentifier [System.Management.Automation.PsEngineEvent]::ScrollUp
Click Event
The click event should support both a single click and double-click events. Both should include terminal coordinates where the event occurred.
Register-EngineEvent -Action { Perform-AnAction -At $event.Coordinates } -SourceIdentifier [System.Management.Automation.PsEngineEvent]::DoubleClick