Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse tracking translates dragging with finger down to scroll wheel events #1384

Open
scandum opened this issue Dec 16, 2019 · 7 comments · May be fixed by #4083
Open

Mouse tracking translates dragging with finger down to scroll wheel events #1384

scandum opened this issue Dec 16, 2019 · 7 comments · May be fixed by #4083

Comments

@scandum
Copy link

scandum commented Dec 16, 2019

When mouse tracking is enabled Termux sends scroll-wheel up and down codes when swiping up and down.

While this is cute it prevents implementing any kind of advanced mouse functionality in Termux, like dragging.

drag

Drag support is essential functionality to me while mouse-wheel support is not.

@fornwall
Copy link
Member

If one is using a mouse (as checked with e.isFromSource(InputDevice.SOURCE_MOUSE)) dragging while holding the mouse button should work.

We currently translate dragging the finger to scroll wheel events to enable scrolling e.g. output in tmux. The reasoning it that it's hard to drag things with precision using a finger, so we might just as well enable scrolling in that case.

I'm willing to reconsider this, let me know what you think.

@fornwall fornwall changed the title Termux Mouse Tracking handling Mouse tracking translates dragging with finger down to scroll wheel events Dec 31, 2019
@scandum
Copy link
Author

scandum commented Dec 31, 2019

My software translates a crude drag into a swipe event, so even if the touch screen is too crude for dragging, the user would still have access to 8 swipe directions, and I am also planning to add a drag down and drag up event that could easily be used to mimic vertical scroll, as well as horizontal scroll.

So maybe it's time for tmux to add drag support and not stand in the way of progress? :)

@fornwall
Copy link
Member

fornwall commented Jan 5, 2020

@scandum Thanks for the input! I'm experimenting and checking with others.

@fornwall
Copy link
Member

fornwall commented Jan 5, 2020

Older issue: #35, and PR #98.

@scandum
Copy link
Author

scandum commented Jan 6, 2020

@fornwall Scroll wheel up/down by dragging with two fingers definitely has my vote. I'd suggest adding horizontal scroll wheel support while at it.

Another (minor) issue I'm having is that if you press down and hold steady for 0.5 seconds a copy/paste dialog is triggered, even when mouse mode is enabled.

Might be an idea to change this to pressing down and holding steady for 0.5 seconds with two fingers, upon which termux could automatically create a proper selection rectangle between the two points? Also an option to make the copy/paste menu a ctrl-enabled single finger press action when mouse mode is set.

As for increasing / decreasing font size, if this creates false positives you could make this an option that requires holding down control when mouse mode is enabled. Could also allow ctrl two-finger up/down scroll to change font size as this would be identical to xterm behavior.

Yet another idea: could allow alt-click to send a right button mouse click. This could help with handling some default configurations.

@scandum
Copy link
Author

scandum commented Apr 15, 2020

Just a little bump since it has been 4 months.

windowmap

Any news? Keep in mind that TinTin++ has over 10,000 users who would actually use this. Sounds like all that's needed is some configurable toggle.

@trygveaa
Copy link
Contributor

It would be neat if changing between drag an scroll for one finger drag could be toggled live, e.g. with a button in the extra keys row. Since scrolling is common in tmux and weechat, using two fingers for that would be impractical (though, also a nice option to have in addition).

rigrig added a commit to rigrig/termux-app that referenced this issue Aug 7, 2024
Adds a setting so users can choose whether dragging the touch screen sends mouse move events, or scroll wheel up/down.
Defaults to scroll wheel (the old behavior).

Closes termux#1384
rigrig added a commit to rigrig/termux-app that referenced this issue Aug 7, 2024
Adds a setting so users can choose whether dragging the touch screen sends mouse move events, or scroll wheel up/down.
Defaults to scroll wheel (the old behavior).

Closes termux#1384
rigrig added a commit to rigrig/termux-app that referenced this issue Aug 7, 2024
Adds a setting so users can choose whether dragging the touch screen sends mouse move events, or scroll wheel up/down.
Defaults to scroll wheel (the old behavior).

Closes termux#1384
@rigrig rigrig linked a pull request Aug 7, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants