ScratchABit icon indicating copy to clipboard operation
ScratchABit copied to clipboard

[wishlist] Mouse wheel support

Open neuschaefer opened this issue 7 years ago • 3 comments

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

neuschaefer avatar May 25 '17 03:05 neuschaefer

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)

neuschaefer avatar May 25 '17 05:05 neuschaefer

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.

pfalcon avatar May 25 '17 05:05 pfalcon

I have a mostly working patch. I'll polish it a bit and then make a pull request.

neuschaefer avatar May 26 '17 17:05 neuschaefer