Live data from Hacker News

Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

gitclear.com

261–270 of 284 posts

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#261

Earlier quoted context omitted.

This. If you ever look at apples raw input touch privateframework it provides enough data for the relative direction/size as well as has some encoded states to at least detect between a very faint touch and a finger on the trackpad. This I think goes back to the first unibody MacBooks from around 2008.

The multitouch trackpads actually showed up in the early 2008 MacBook Pros that were the last ones before switching to the unibody enclosure (IIRC the keyboard/trackpad parts could be retrofitted into 2007 MacBook Pros). The early 2008 models still had a separate physical button at the bottom of the trackpad. The late 2008 models got rid of the button and made the whole trackpad hinged at the top to act as a button.…

Yep. And this blog post from 2009 was a big inspiration for me in exploring touch on the mac: https://archive.org/details/2009-03-28-steike-code-macbook-m...

and a comment a few years ago by me: https://news.ycombinator.com/item?id=23274577

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#262

Earlier quoted context omitted.

I don't have a MacBook but I looked up a video and this seems interesting. But how does it solve the problem of hitting the edge of the trackpad? If anything, it seems like it makes the problem worse because now you have three fingers on the trackpad so you will hit the edge quicker.

So I will do my best to explain it, one of the hard problems here is this is just kinda second nature for me. So I may not do a good enough job of explaining it. But ok so for me, I basically am always resting my thumb (I am right handed if that helps visualize) on the bottom-ish part of my trackpad. So so when I am moving my mouse I have 2 fingers on it. My thumb is just sitting there and my index is moving around.…

Oh I get using your thumb to click/hold like it's a button. I was questioning the three-finger-drag but the other comment answered it, the gesture is "sticky" so you can reposition quickly when you hit the edge.

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#263
post #165

Earlier quoted context omitted.

Also when "holding" a window or icon?

The cursor moves the same way, it's just a bit harder because you can't let go of the cursor and start over from the corner of the touchpad with more room to move once you've pressed. But thanks to acceleration, you can move fast towards e.g. the left, slowly move back to the right (covering a much shorter distance), then move fast back left to finish the travel, if you missed it the first time.

Thank you for explaining how you work. But kinda sounds like a workaround?

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#264

Earlier quoted context omitted.

Doesn't putting 3 fingers on a track pad already feel so damn awkward? I have to position my wrist so oddly to do something like that.

Are you positioning your wrist differently for three fingers than for one to place your fingers at a particular angle on the trackpad? Or just to reach further into the trackpad to make room for the other fingers? If it’s the former, you don’t need to do that, it will work at whatever angle feels comfortable to you.

So my hands are always resting on ASDF and JKL;

Most natural to use the track pad is to curl my right hand towards me with my wrist still touching the macbook. One finger feels decent, but already 2 fingers feels a bit off to me. And 3 fingers even worse. It's really stretching my wrist at that point. My wrist is always positioned on right of the trackpad, but putting 3 fingers on the trackpad is putting it at an uncomfortable angle.

Even with one finger I think I have to bring my wrist quite away from the usual position though, off the laptop with its bottom. But three fingers feels uncomfortable even when I do that.

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#265
If you want to have mouse scroll wheel acceleration, you might be interested in a small project of mine: https://github.com/albertz/mouse-scroll-wheel-acceleration-u...

I'm using this all the time on non-Mac platforms. Once you get used to this, it's hard to get back.

But I'm still waiting that such a feature gets more built into the core, e.g. libinput or so.

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#266
post #220

Earlier quoted context omitted.

I've connected an Apple Magic Trackpad (external bluetooth trackpad that sits on your desk) to an ubuntu machine and it's wonderful. There are still some software things to solve to get the acceleration perfect and things like scrolling working, but having trackpad hardware that isn't trash goes a really long way.

I tried doing this with a Thinkpad but the BT connection would cut out periodically and I gave up. Did you have to do anything special to get it working?

Nope, it "just worked." I ended up vastly preferring a mouse, though, so I didn't stick with it long term.

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#267

Earlier quoted context omitted.

While is may be true from a user perspective, this "kinetic scrolling simulation" was removed, because it could lead to unexpected behaviour. Example: If you where scrolling in a window, the driver kept sending scroll events for a short time to simulate kinetic scrolling. Now, if you moved the cursor to another window, the other window started scrolling, because of the simulated events. This is not the case on macOS.…

Putting the effort on the shoulders of App developers instead of solving it at one place leads to so much wasted developer time, that could have been put into new features or solved issues. I was shocked about how nobody seemed to notice that. However, they are not "hobby" at all. Peter Hutterer is awesome and he understands the problem very well - but as a single developer it's hard to convince a whole community Wai…

> I'm pretty sure Hutterer was the one who pushed it into the App layer.

I'm not sure what he did and I'm not trying to do fingerpointing. I thought he just pushed it away from libinput stating that it's the wrong place to handle it and wanting to keep libinput as "clean" as possible - even if this might be a questionable argument in this case.

To answer one of your other comments...

> If you mark them with a "this is a synthetic event" bit, the compositor/windowmanager has all the information it needs to decide whether or not to ignore the event (because, for example, the pointer moved out of one window and into another).

Yeah, this would be one of the many possible partial solutions. Don't get me wrong, I'm totally fine with this suggestion, but let's think that through:

libinput implements "simulated" events algorithm for intertial scrolling. It also would probably need a config setting for "speed" or "intensity". Nevertheless, this would not help without changes in at least one of the other layers I mentioned (Compositor, Window Manager, Apps) to either ignore or handle these events. In my opinion the App layer is the wrong place, because so every App developer / maintainer who want's to support inertial scrolling had to implement it AGAIN for his personal app which would create a tremendous amount of additional effort and different implementations acting differently. Not a great user experience...

So, the (additional) implementation has to be done somewhere between libinput and the App layer, which means either compositor or window manager.

Now, if an implementation in one of these layers is inevitable to get it working, why should it be implemented in libinput? Issues would spread over two projects, instead of one and getting pushed back and forth. This is of course my personal opinion.

Instead NOBODY implemented it and App developers and Framework Developers (QT, GTK, etc.) put in the effort to workaround this problem. That just feels wrong to me.

I wish at least one project just had shown good will to do it, in my opinion it would have been better to implement it everywhere (with optional disable) instead of nowhere, but I think it's just a too heated topic to solve it easily :-)

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#268

Earlier quoted context omitted.

If I'll ever use a desktop again I also want an external touchpad and I want to place it in front of the keyboard like on a laptop. But you wrote trackpad. It's it the one with the ball? Probably not because you also wrote about multitouch. So, which trackpad do you use?

I'm a 100% trackpad user as well, and I also got into mechanical keyboards so my setups always look like this now: https://imgur.com/a/pmRO9r9 That one is an older magic trackpad, if it ever dies I'll upgrade to the newer one.

What's the two keyboards layout for? At first I suspected that they are two different keyboards, let's say US and some national layout, but they are both US. Maybe the black one is not connected and it's there only for the picture?

Anyway, that's the keyboard/touchpad layout I would use too. The only difference is that I like touchpads with physical buttons. Three of them because I use Linux and pasting text with the middle button is great.

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#269

Earlier quoted context omitted.

My work laptop is a macbook and I have been using it for over 5 years, but I still can't get a handle on it, even for a right click. I am not sure how people find MacOS so good. It just constantly goes against my intution and muscle memory. I also hate how I have to constantly turn of the mouse acceleration at random times using CLI.

Right click is just tap with two fingers. What issue are you having?

How do you middle-click?

Re: Linux Touchpad Like MacBook Update: 2023 Progress on Smooth Scrolling

#270

Earlier quoted context omitted.

Try enabling "XINPUT2" in firefox, you'd be surprised what a difference it makes

I gave it a try. The difference is that XINPUT2 scroll has inertia: I start scrolling, remove the fingers from the touchpad and it keeps scrolling for a while. If I want to stop when I see something interesting I have to click or it will scroll away. That adds an extra action that must performed at the right time. I don't think I like that because this is not a videogame and Firefox is not supposed to challenge my ab…

Try it for some longer time. Scrolling on Macbook becomes subconscious. I don't think about it anymore. I don't even notice that I am moving my fingers. The scroll pane just moves where I want it to move. Simulating the behavior of physical objects allows our minds to reuse what it learned about the physical world. That is imho a very powerful user interface metaphor. But beware, this is just an anecdote.
Post reply on HN