Git Product home page Git Product logo

Comments (48)

danirabbit avatar danirabbit commented on July 22, 2024 12

I've created a project to track multi-touch gestures inside apps: https://github.com/orgs/elementary/projects/61

from switchboard-plug-mouse-touchpad.

danirabbit avatar danirabbit commented on July 22, 2024 8

It looks like macOS offers individuals toggles for each gesture and the ability to change the gesture for each function. I think having toggles for each gesture makes sense rather than all or nothing.

customise-macos-default-trackpad-gestures

from switchboard-plug-mouse-touchpad.

JoseExposito avatar JoseExposito commented on July 22, 2024 6

Oh crap, I'm 6 days late to claim that $100 bounty... Such a bad timing 🀣 🀣 Just kidding πŸ˜‹

I'm testing with 3 different designs, let me know which one you like the most or if you have something else in mind. You are much better than me on UX, so I'll really appreciate your advice.

In my opinion, moving "Gestures" to a different tab works quite well. It allows us to avoid overloading the "Touchpad" tab while allowing to add as many gestures as we want plus some info/help text in case we consider it is required.

An icon is required though... It is just better if I don't try to paint it, believe me πŸ˜†

About the available gestures, I'll add: (personal opinion)

  • Multitasking view (swipe up with 3/4 fingers)
  • Change desktop (swipe left or right with 3/4 fingers)
  • Maximize window (swipe up with 3/4 fingers)
  • Tile/snap window (swipe left or right with 3/4 fingers)
  • Minimize/hide window (swipe down with 3/4 fingers)

Here are the mocks

  • Text + Combo Box: The combo box includes a "Disabled" option. Personally, I like this one the most. It looks like the "Scrolling" option in the "Touchpad" tab:
    only-combos

  • Text + Switch + Combo: It looks like the "Physical clicking" option in the "Touchpad" tab:
    with-switches

  • Text + Switch + Combo in 2 lines: I feel like that the font size for the label should be a little bit bigger. I don't think this option is used somewhere else in the system settings, so -1 for inconsistency:
    two-lines

from switchboard-plug-mouse-touchpad.

danirabbit avatar danirabbit commented on July 22, 2024 6

@JoseExposito if you wanted to open a draft PR that would be great :) I can work on an icon. This looks awesome though, I'm super excited how quickly this is all coming together. Great work! And yeah unfortunately we're not using Bountysource anymore, but maybe we can figure out some kind of compensation. I see you're on GitHub sponsors. I'll bring it up with the team :)

I agree with Cass that this probably makes more sense under "behavior" in the sidebar. And yes definitely agree that it makes sense as its own page separate from touchpad, especially since it effects touch screens as well.

Also agree that using a switch makes it easy to turn things off or on without losing your previous selection (which may be the default). I imagine for some folks they'll want to experiment a little until they find their right setup. The last option you showed fills up vertical space nicely, which if we only have a few options could be good. If we go with that one, we should double space between options so it's clear that the label, switch, and combo are all one group

As for which options, I agree with your selection with the exception of Minimize/Hide. We're really trying to de-emphasize minimize, especially since the shell doesn't really handle it well. Though we do still have "Hide" in keyboard shortcuts, so it's not a hill I'll die on πŸ™ƒ. The options you have listed with directions and fingers make sense to me. To be consistent with the rest of the interfaces I think the strings should be:

  • Multitasking View
  • Switch Workspaces
  • Maximize Window
  • Tile Window

from switchboard-plug-mouse-touchpad.

Akryum avatar Akryum commented on July 22, 2024 5

@cassidyjames Both MacOS and Windows 10 use a 3 fingers gesture for worskpace switching and windows overview. I'm not sure if four-finger is intuitive enough for new users, especially if they come from those OSes.

from switchboard-plug-mouse-touchpad.

marbetschar avatar marbetschar commented on July 22, 2024 5

Until there's an official integration of Multi Touch Gestures, you might want to try fusuma. It works addictively well!

For autostarting, I simply added fusuma as custom command in System Settings > Applications > Startup

Here's the config I use for elementary OS:

$ cat ~/.config/fusuma/config.yml 
swipe:
  3:
    left:
      command: 'xdotool key alt+Right'
    right:
      command: 'xdotool key alt+Left'
  4:
    left:
      command: 'xdotool key super+Right'
    right:
      command: 'xdotool key super+Left'
    up:
      command: 'xdotool key super+Down'
    down:
      command: 'xdotool key super+Down'
pinch:
  2:
    in:
      command: 'xdotool key ctrl+plus'
      threshold: 0.1
    out:
      command: 'xdotool key ctrl+minus'
      threshold: 0.1

threshold:
  swipe: 1
  pinch: 1

interval:
  swipe: 1
  pinch: 1

from switchboard-plug-mouse-touchpad.

cassidyjames avatar cassidyjames commented on July 22, 2024 5

@JoseExposito awesome! I personally like the text/switch/combo as it lets you quickly toggle settings on/off ideally without losing your previous selection. Also, a note: this should go under Behavior in the sidebar, not Devices imho since it deals with gestures on both touch screens and trackpads. πŸ˜‰ As for the icon, we will need to come up with something, but you could use input-touchpad-gesture or something as a placeholder for now which I think should fallback to the touchpad icon.

from switchboard-plug-mouse-touchpad.

danirabbit avatar danirabbit commented on July 22, 2024 4

I don't think libinput-gestures is the route to pursue here. What we really want is to implement native 1:1 gestures in Gala, not gesture shortcuts that activate after the fact. This issue is effectively blocked by Wayland.

from switchboard-plug-mouse-touchpad.

cassidyjames avatar cassidyjames commented on July 22, 2024 3

Also to note: it sounds like GNOME is standardizing on four fingers for OS/Shell-level gestures, and I think we should as well. That allows apps to have three-finger gestures where it makes sense, and I don't want to conflict with that expectation too much. I believe macOS makes a similar assumption.

from switchboard-plug-mouse-touchpad.

cassidyjames avatar cassidyjames commented on July 22, 2024 3

@danrabbit yeah that's fair. We'd probably want to break Gestures out into its own tab at that point, then, too?

from switchboard-plug-mouse-touchpad.

peteruithoven avatar peteruithoven commented on July 22, 2024 3

Why not reuse the same UI principle as custom Keyboard shortcuts?
A first column with possible actions (possibly keyboard shortcuts), the second are the gestures. When clicking on the gesture you can record a new one.
(and yeah should probably go into a new tab)

from switchboard-plug-mouse-touchpad.

bumper314 avatar bumper314 commented on July 22, 2024 2

Just another data point, Chrome OS will be adding "virtual desks" (workspaces) in the forthcoming Chrome OS 78 release, with 3 finger swipe being the gesture to switch between desktops. Source.

Personally, I prefer 4 finger, so that's my vote.

from switchboard-plug-mouse-touchpad.

SephReed avatar SephReed commented on July 22, 2024 2

This has legitimately been the biggest barrier to entry for me personally for a while. I'm hardcore addicted to the gestures on MacOS and can not go for any extended period of time without them.

I can't use Windows for the same reason.

Through my very strange metrics, ElementaryOS could be a truly better OS than Windows simply by being something I could gesture at. It makes laptops feel like magic.

from switchboard-plug-mouse-touchpad.

codygarver avatar codygarver commented on July 22, 2024 1

@marcelogdeandrade if you get it working with something that's not already a default package and the code is approved, I will do the rest and make it available.

from switchboard-plug-mouse-touchpad.

SephReed avatar SephReed commented on July 22, 2024 1

Why not reuse the same UI principle as custom Keyboard shortcuts?
A first column with possible actions (possibly keyboard shortcuts), the second are the gestures. When clicking on the gesture you can record a new one.

While recording might be difficult, allowing users to choose seems like the best way to. Then you can enable it, disable, customize. Also, not everybody has 4 fingers. I know that's not super common, but can you imagine how shitty that would be?

Also, I know everyone thinks their issue is the most important, but I've been following EOS for about 3 years waiting for this feature. Windows inability to make this feature work smoothly is one of the main reasons I find the OS unusable. Then again, I haven't seen any other MacOS user who depends on desktops as much as I do... maybe it's just me.

from switchboard-plug-mouse-touchpad.

alice-mkh avatar alice-mkh commented on July 22, 2024 1

Recording is impossible, I'll just say that.

The only blocker for just implementing gestures is Wayland, though that's a pretty huge one. :) Once Pantheon uses Wayland, implementing gestures would be easy. Until then, impossible.

libinput-gestures is a hack, it's not an appropriate implementation here. Once libinput-debug-events changes its output (it's just a debug tool, there are no stability guarantees), it will break spectaculatly. And you have to be in input group, and it requires raw device access, which is very insecure (though with X11 that's not a concern in any case, because there are easier ways to write e.g. keyloggers)

from switchboard-plug-mouse-touchpad.

donadigo avatar donadigo commented on July 22, 2024

Looks like we should use something like libinput-gestures for this.

from switchboard-plug-mouse-touchpad.

marcelogdeandrade avatar marcelogdeandrade commented on July 22, 2024

I will try to do this.

What's your opinion on using this lib?

from switchboard-plug-mouse-touchpad.

marcelogdeandrade avatar marcelogdeandrade commented on July 22, 2024

If I use libinput-gestures, it should be a default package on elementary right? Where is the right place to make this change so it should be a default system package?

from switchboard-plug-mouse-touchpad.

codygarver avatar codygarver commented on July 22, 2024

Using a library already in the repos would be preferable, but I am not familiar with this situation so maybe libinput-gestures is appropriate if others agree.

from switchboard-plug-mouse-touchpad.

marcelogdeandrade avatar marcelogdeandrade commented on July 22, 2024

Ok, thanks for the help, I'll work on this issue

from switchboard-plug-mouse-touchpad.

marcelogdeandrade avatar marcelogdeandrade commented on July 22, 2024

I'm finishing my first implementation, just one question:

Do you prefer to have predetermined shortcuts to swipe gestures or to receive any shortcut from the user?

If the answer is predetermined shortcuts, which ones?

Thanks

from switchboard-plug-mouse-touchpad.

peteruithoven avatar peteruithoven commented on July 22, 2024

I'm not sure I understand the question, but shouldn't this be configurable, just like Keyboard shortcuts?

from switchboard-plug-mouse-touchpad.

marcelogdeandrade avatar marcelogdeandrade commented on July 22, 2024

My question was if you prefer these gestures to be configurable like keyboard shortcuts or to have limited predetermined actions. I will try to make them configurable, so you can choose whatever shortcut you want.

I was looking into the keyboard project, and they have specific classes to create that configurable feature. Can I copy those files and make them duplicated in two projects? (switchboard-plug-keyboard and switchboard-plug-mouse-touchpad)

from switchboard-plug-mouse-touchpad.

marcelogdeandrade avatar marcelogdeandrade commented on July 22, 2024

Oh, that's too bad, I had just finished my implementation with libinput-gestures πŸ˜•.

Anyways, I'll create an PR based on what @donadigo and @codygarver said and you can see if there's anything that can be used in the future πŸ˜ƒ

from switchboard-plug-mouse-touchpad.

cassidyjames avatar cassidyjames commented on July 22, 2024

My opinion is that while 1:1 is obviously preferred, libinput-gestures is a minimal step in the right direction and does feel much better than having nothing at all. That said, I don't think per-swipe configuration is really something we'd want; instead, I'd expect to see something like this in the UI:

Multi-touch gestures: (--o) (i)
____________________________/\__________________________
|                                                      |
|  Four-finger swipe left/right to switch workspaces.  |
|  Four-finger swipe up for Multitasking View.         |
|______________________________________________________|

And then we could manage whether switching right/left is inverted based on the scroll direction key, so it always matches other scrolling on the device.

If a user wants fine-grained control over gestures, they can edit the config or install a dedicated tool like Gestures to do so.

from switchboard-plug-mouse-touchpad.

marcelogdeandrade avatar marcelogdeandrade commented on July 22, 2024

@cassidyjames I believe this implementation with a fixed behaviour is much simpler than the one I did, if you guys decide that using libinput-gestures is ok for now, I can change it to the UI you proposed.

from switchboard-plug-mouse-touchpad.

peteruithoven avatar peteruithoven commented on July 22, 2024

If we want to define a predefined list I'd recommend doing some research on how other OS's handle multi touch, maybe create a short overview. See is there is common ground.

from switchboard-plug-mouse-touchpad.

cassidyjames avatar cassidyjames commented on July 22, 2024

macOS and GNOME use four-finger swipes to switch workspaces. I am not sure about Windows. macOS uses a four-finger swipe up to bring up the multitasking view. I believe those all make sense here, especially since we already have two-finger swiping between workspaces in the Multitasking View. So this would just be an extension of that without having to jump into that view with the mouse or keyboard first.

from switchboard-plug-mouse-touchpad.

marcelogdeandrade avatar marcelogdeandrade commented on July 22, 2024

I can continue to develop this feature tomorrow, do you think it is better to wait for a decision? Or can I try to do the UI with custom shortcuts?

from switchboard-plug-mouse-touchpad.

ma1onso avatar ma1onso commented on July 22, 2024

When will Wayland be ready for elementary os? wait for the next release of Ubuntu LTS for support gestures, two years more :/, bad decision. Fractional scaling DΓ©jΓ  vu :(.

from switchboard-plug-mouse-touchpad.

cassidyjames avatar cassidyjames commented on July 22, 2024

@Akryum macOS uses four fingers. https://support.apple.com/en-us/HT204895

from switchboard-plug-mouse-touchpad.

cassidyjames avatar cassidyjames commented on July 22, 2024

@Akryum Windows 10 also uses four fingers for workspaces. https://support.microsoft.com/en-us/help/4027871/windows-10-touchpad-gestures

from switchboard-plug-mouse-touchpad.

Akryum avatar Akryum commented on July 22, 2024

@cassidyjames The 2017 macbook pro I had was 3 fingers but ok. 😸

from switchboard-plug-mouse-touchpad.

psafarov avatar psafarov commented on July 22, 2024
int main (string[] args)
{
    var udev = new Udev.Udev();
    var interface = Libinput.Interface() {
        open_restricted = (path, flags) => Posix.open(path, flags),
        close_restricted = (fd) => Posix.close(fd)
    };
    var context = Libinput.Context.udev_create_context(interface, null, udev);
    context.udev_assign_seat("seat0");

    while (true) {
        context.dispatch();

        Libinput.Event? event;
        unowned Libinput.Event.Gesture? gesture;
        while ((event = context.get_event()) != null) {
            switch (event.get_type()) {
                case GESTURE_SWIPE_BEGIN:
                case GESTURE_SWIPE_UPDATE:
                case GESTURE_SWIPE_END:
                    if ((gesture = event.get_gesture_event()) != null) {
                        stdout.printf("Gesture swipe with %d fingers\n", gesture.get_finger_count());
                    }
                    break;
                default:
                    print(event.get_type().to_string() + "\n");
                    break;
            }
            context.dispatch();
        }
    }

    return 0;
}

It is relatively easy get swipe gestures events from libinput. I am not familiar very well with gala myself, unfortunately, to transform it into something useful.

from switchboard-plug-mouse-touchpad.

alice-mkh avatar alice-mkh commented on July 22, 2024

@Akryum macOS uses four fingers. https://support.apple.com/en-us/HT204895

it's configurable between 3 or 4, though I don't know which one is default.

Edit: https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2016/07/Trackpad-changes-swipe-full-screen-Mac-screenshot.jpg?itok=r4lGC5d3

from switchboard-plug-mouse-touchpad.

ekvedaras avatar ekvedaras commented on July 22, 2024

@Akryum macOS uses four fingers. https://support.apple.com/en-us/HT204895

it's configurable between 3 or 4, though I don't know which one is default.

Edit: https://www.imore.com/sites/imore.com/files/styles/xlarge/public/field/image/2016/07/Trackpad-changes-swipe-full-screen-Mac-screenshot.jpg?itok=r4lGC5d3

Everytime I used a mac it was 3 fingers. Not even sure where to change it to 4.

from switchboard-plug-mouse-touchpad.

alice-mkh avatar alice-mkh commented on July 22, 2024

Everytime I used a mac it was 3 fingers. Not even sure where to change it to 4.

System Preferences -> Trackpad -> the screenshots I linked to

from switchboard-plug-mouse-touchpad.

linuxr01 avatar linuxr01 commented on July 22, 2024

Elementary OS touch gestures tutorial https://www.youtube.com/watch?v=ArBCfhVsTZw.

from switchboard-plug-mouse-touchpad.

SephReed avatar SephReed commented on July 22, 2024

Also, the bounty on this is up to $170, if someone is able to update the title.

from switchboard-plug-mouse-touchpad.

SephReed avatar SephReed commented on July 22, 2024

I searched around and found no road map for when wayland will make its way into EOS. If anyone knows, please share. I'd like to set a calendar reminder to come check out the OS again. It's really come along these passed 3 years!

from switchboard-plug-mouse-touchpad.

alice-mkh avatar alice-mkh commented on July 22, 2024

I don't think there's a roadmap, but it's a really huge change. And the largest part of the change is that most third-party apps will need changes (for example, saving and restoring window position and size, like they do now, is not possible in Wayland, so not only a replacement will need to be written, but apps will need to be ported), so it would also require a major version bump.

from switchboard-plug-mouse-touchpad.

SephReed avatar SephReed commented on July 22, 2024

Is there any reason this tool couldn't be included by default, with a bit of UI for setting it up?

from switchboard-plug-mouse-touchpad.

marbetschar avatar marbetschar commented on July 22, 2024

@SephReed I expect this tool is not included because it is considered a hack and insecure. See the comment from Exalm earlier in this issue: #16 (comment)

from switchboard-plug-mouse-touchpad.

andirsun avatar andirsun commented on July 22, 2024

Maybe in the near future the elementary os team will do a gestures in the touchpad natively ?

@SephReed I expect this tool is not included because it is considered a hack and insecure. See the comment from Exalm earlier in this issue: #16 (comment)

from switchboard-plug-mouse-touchpad.

SephReed avatar SephReed commented on July 22, 2024

Lot of attention for touch pads in linux lately: https://bill.harding.blog/2020/05/17/linux-touchpad-preliminary-project-funding-survey-results/

from switchboard-plug-mouse-touchpad.

alice-mkh avatar alice-mkh commented on July 22, 2024

That project is soo misguided. Libinput has supported gestures since forever, it's really XI2 and individual apps/Gala that are not supporting them. When you have Wayland and so not bound by XI2, gestures are perfectly possible and e.g. gnome-shell has some at this point.

Nevermind the "libinput sucks, we can do it better" approach. All of the non-gesture things there vary wildly depending on hardware and if something doesn't work on libinput well, it's likely because nobody has reported an issue (and it's impossible to test in every hardware on existence), not because libinput is bad and let's fund a better driver. (Edit: Oh, so now they want to contribute to libinput, that's better)

And of course the whole "Make Linux touchpad work as well as on MacBook" premise β€” a large part of that is hardware.

Also they didn't let my comment similar to this one in. 🀣

from switchboard-plug-mouse-touchpad.

JoseExposito avatar JoseExposito commented on July 22, 2024

Sure, here is the PR: #157

It only contains a bare-bones UI with your suggestions, but it allows us to start working on it!

from switchboard-plug-mouse-touchpad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.