ScratchABit
ScratchABit copied to clipboard
[wishlist] Mouse wheel support
Hi, first of all, nice project!
I'd like to be able to use the mouse wheel to scroll the viewport. As far as I can see, ScratchABit would have to:
- [ ] announce its interest in mouse scroll events to the terminal
- [ ] interpret the control sequences for scroll up/down
- [ ] pass those events down into the Editor view and handle them similar to page up/down events
Ok, If we switch to the X11 mouse protocol, and enable Alternate Scroll mode, we can receive events for buttons 4 and 5, which are the scroll wheel.
(the picotui repo may be a better place for this discussion)
Thanks for trying ScratchABit, feel free to share more of your impressions.
(the picotui repo may be a better place for this discussion)
Indeed, majority of the functionality would need to be implemented in picotui, SAB would just handle the picotui events.
I have a mostly working patch. I'll polish it a bit and then make a pull request.