radu242753435752 has quit [Ping timeout: 245 seconds]
Ordoviz has joined #foot
h-erectus has joined #foot
fitrh has joined #foot
fitrh has quit [Client Quit]
Ordoviz has quit [Ping timeout: 245 seconds]
Ordoviz has joined #foot
h-erectus has quit [Ping timeout: 240 seconds]
<WhyNotHugo>
When I scroll with touch-and-drag on less, the text follows my finger as I move along (e.g.: if I move my finger 4cm, the text moves 4cm).
<WhyNotHugo>
However, on senpai, if I move my finger 4cm, the text moves like 8cm.
<WhyNotHugo>
Do both less and senpai get the same events from the terminal?
<WhyNotHugo>
Scrolling with `less` works even if I don't pass `--mouse` (and unset $LESS). So it seems that it handles touch-scrolling via some mechanims that _is not_ mouse events...?
ayushnix has joined #foot
ayushnix has joined #foot
ayushnix has quit [Changing host]
ayushnix has quit [Remote host closed the connection]
<rockorager>
WhyNotHugo: less might be setting alternate scroll mode (DEC 1007), which reports mouse scrolls as arrow presses
<rockorager>
Tcell doesn't set that mode
<WhyNotHugo>
So setting alternate scroll mode would result in touches sending arrow presses and scrolling the right amount... but would the client (e.g.: senpai) know _where_ the touch ocurred?
<WhyNotHugo>
From the issue: > alternate scroll mode is implicitly disabled, temporarily if you like, while an application is grabbing mouse events
<WhyNotHugo>
The question is: can we enable alternate mode while the applicaiton is grabbig mouse?
<dnkl>
WhyNotHugo: in short, alternate scroll translates mouse events to arrow key events. It's only used on the alternate screen, and only when the application hasn't enabled mouse events.
<dnkl>
when the application has enabled mouse events, it receives the "raw" number of scrolled lines. I e the multiplier from foot.ini is not applied
<dnkl>
don't remember if we apply the multiplier to alternate scroll
<WhyNotHugo>
When I touch-drag an application, foot sends mouse events that scroll an amount disproportionate to the amount of finger-movement.
<WhyNotHugo>
With alternate mode, the amount of "arrow key presses" is correct, so the amount of scroll is correct.
<WhyNotHugo>
So I guess that the issue is really in how touch-events are translated to mouse-scrolls in non-alternate mode?
<dnkl>
WhyNotHugo: I'm guessing you don't want the multiplier applied. Or rather, we should have a separate multiplier for touch events
<WhyNotHugo>
I think that sounds correct.
<dnkl>
except, senpai does enable mouse events. So it should be senpai that's multiplying the amount is scrolled lines in this case
<WhyNotHugo>
When I use the mouse wheel, it scroll the right amount. And senpai can't know if I'm using a wheel or touchscreen, so I think that the multiplier needs to happen in foot (which does know).
<dnkl>
WhyNotHugo: this needs to be tracked and discussed in an issue. If we are to apply a multiplier option for touch events, even when mouse grabbing is enabled, that'd be a different behavior, compared to normal mouse events. For example, does that mean we need to touch multipliers? One that corresponds to the existing one, and another for when mouse grabbing is enabled?
<Amnesia>
question; how exactly are you guys starting the foot server (if you even are using server mode)?
<dnkl>
WhyNotHugo: btw, what's the "right" amount? For me, senpai scrolls 4 lines for each mouse wheel "click".
<dnkl>
Amnesia: dinit user service
<Amnesia>
currently I've put it in my sway config; because when I use the systemd service/socket; it fails to start because the wayland socket isn't available yet :X
<Amnesia>
TIL the dinit init system
<WhyNotHugo>
dnkl: I'll open an issue for this.
<dnkl>
WhyNotHugo: in any case, it's important to realize senpai multiplies the number of lines. While it should probably be considered a bug if touch-scrolling a line results in a different number of events being sent to the application, compared to regular mouse scrolls, senpai is still a bad way to test things. It's better to test in an environment where there's no multiplier
<WhyNotHugo>
Changing the multiplier in senpai to "1" results in only one line scrolling at a time...
<WhyNotHugo>
... However, when I move the mouse wheel "one click", it now scrolls just one line, whereas it scrolls three on a terminal.
<dnkl>
WhyNotHugo: this behavior (not applying the multiplier to mouse events) has been discussed before, on the issue tracker
<dnkl>
what it comes down to is this: the application must have full control over the events. There's no way for the application to scroll a single line if foot forces three lines. Most applications that supports mouse scrolling do expose their own multiplier option.
<WhyNotHugo>
I can hardcode any multiplier that I want for senpai, but there is no correct value.
<WhyNotHugo>
I want 3x for mouse-wheel and 1x for touch (e.g.: like on non-mouse-capturing applications).
<WhyNotHugo>
But senpai cannot distinguish the two.
<dnkl>
WhyNotHugo: in a sense this is unsolvable, and comes down to touch not really existing in the terminal world. Basically, what you're asking for, is a ¼ multiplier, to counteract senpai's mouse multiplier.
<WhyNotHugo>
Could foot apply a multiplier itself before sending mouse scroll events?
<WhyNotHugo>
Or is this too likely to break other tools?
<rockorager>
WhyNotHugo: Does less have the correct behavior right now?
<rockorager>
1 line on touch, 3 lines on mouse wheel?
<rockorager>
dnkl: does foot receive different wayland events for mouse scroll vs touch scroll?
<rockorager>
Or does libinput map touch scrolls already....?
<rockorager>
What about scroll direction??
<WhyNotHugo>
rockorager: Yes, less behaves correctly (e.g.: text moves under the finger when touch-dragging, but scrolls 3 lines with mouse-wheel).
<rockorager>
also foot.ini.multiplier I assume *only* applies to foot scroling (IE history)?
<WhyNotHugo>
foot has native support for pointer vs touch inputs, so receives different events from the compositor.
<WhyNotHugo>
(FYI: converting touch events into mouse events is done by the compositor, and is only done for clients that do not handle touch events themselves).
<rockorager>
How is less doing this??
<rockorager>
I see CSI < 64 ; col ; row M for both my touchpad and mouse wheel but somehow less knows
<rockorager>
Oh I get it
<rockorager>
When an application *doesn't* capture mouse, foot is applying multiplier to mouse wheel but *not* scroll
<rockorager>
echo -e "\x1b[?1007;1049h" && cat -v
<rockorager>
(warning, will leave you in alternate screen)
<WhyNotHugo>
I'm pretty sure that a touchpad counts as a pointing device, not a touch device.
<WhyNotHugo>
Because when you tap on the touchpad, it's just a tap, not a tap with X and Y coords.
<dnkl>
yes, all three are different Wayland events (mouse, touchpad, touch)
<rockorager>
If I do less --mouse it only moves one line for any scroll event
<rockorager>
Which means less doesn't apply any internal scrolling multiplier
<WhyNotHugo>
If you use `--mouse`, then it does mouse-capturing, which is what senpai does.
<rockorager>
Right
<WhyNotHugo>
If you apply that internal multiplier, then touchscreen-dragging will over-scroll.
<rockorager>
So the current state is that you can't capture mouse and emulate "standard" terminal scrolling size and *also* have good touch scroll support
<rockorager>
we need a new mouse button number
<rockorager>
scroll-down is mapped to 64, up to 65, we could probably use 66 and 67 for touch scroll down and touch scroll up
<rockorager>
In a sense, we need terminal gesture support
<rockorager>
three finger swipe left = CSI < 68 M
<rockorager>
:)
<dnkl>
66 and 67 are for wheel left/right ;)
<rockorager>
who has that insanity? But ok, 68+
<dnkl>
for those interested; less has a command line option to set the scroll multiplier
<dnkl>
the button logic is s bit more complicated than that, but yes, it would be possible to extend the protocol with touch specific events
<dnkl>
I'm guessing we'd get pretty far with just being able to configure senpai's multiplier. people who use touch primarily can tune it down
<rockorager>
dnkl: yeah
<rockorager>
But who doesn't want gestures in their terminal?
<rockorager>
I could map a three finger swipe right to ':wq!'
<Lord>
i use foot on my phone ;-)
<rockorager>
Oh I guess we'd need pinch events too?
<rockorager>
Probably for a terminal that should just always map to font size changes
<Lord>
that would be great !
ayushnix has joined #foot
ayushnix has quit [Remote host closed the connection]
ayushnix has joined #foot
ayushnix has joined #foot
ayushnix has quit [Changing host]
ayushnix has quit [Remote host closed the connection]
ayushnix has joined #foot
alexherbo2 has joined #foot
taupiqueur has joined #foot
alexherbo2 has quit [Remote host closed the connection]
alexherbo2 has joined #foot
alexherbo2 has quit [Ping timeout: 246 seconds]
taupiqueur has quit [Ping timeout: 246 seconds]
Ordoviz has quit [Quit: WeeChat 4.0.2]
taupiqueur has joined #foot
alexherbo2 has joined #foot
Armada has left #foot [#foot]
ayushnix has joined #foot
ayushnix has quit [Changing host]
alexherbo2 has quit [Remote host closed the connection]