arakiken / mlterm

Other
147 stars 13 forks source link

Question: send mouse events to application ? #82

Closed mckellygit closed 5 months ago

mckellygit commented 6 months ago

Hi,

Thank you for mlterm. Is it possible to configure mlterm such that [some] mouse events are sent to the application (ie tmux) instead of being used for selection ? Perhaps not all events, I mean like other terminals, if Shift is pressed for example, then send events to mlterm, otherwise send to app, etc. ?

thx, -m

mckellygit commented 6 months ago

Hi,

I think I can do what I want with a few simple changes like -

-  if (!(event->state & (ShiftMask | ControlMask)) && vt_term_get_mouse_report_mode(screen->term)) {
+  if (!(event->state & (ShiftMask)) && vt_term_get_mouse_report_mode(screen->term)) {

So I suppose there is not a config option to set mouse pass-through modifiers. Maybe a decent first mlterm project for me to create a pull request for such a thing ??

thx, -m

arakiken commented 5 months ago

Thanks. I added --norepkey option which set mouse pass-through modifiers. https://github.com/arakiken/mlterm/commit/0fe30b1536a50074956d5a92d51bbf44355f610a

mckellygit commented 5 months ago

Thank you so much! Really appreciated. Set it to shift and ready to go :-)