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

One hand mode (mouse-only activation) #221

Closed
asteinba opened this issue Apr 7, 2022 · 6 comments
Closed

One hand mode (mouse-only activation) #221

asteinba opened this issue Apr 7, 2022 · 6 comments

Comments

@asteinba
Copy link

asteinba commented Apr 7, 2022

The Motivation

Provide a option to activate fly pie just with my mouse. Personally for me fly pie really excels when I'm in lazy mode and just use my mouse and don't have my hand on the keyboard (leaning back, drinking coffee, on phone call). Would be also very cool for people which have just one hand.

The Solution

I have shortcuts in mind like:

  • Pressing LMB+RMB at once.
  • Holding RMB and then click LMB once.
  • Holding RMB and then double click LMB.
  • Hold back mouse button and click LMB (my favorite but idk if you can cancel the back mouse event if the shortcut is detected).

Would be super cool if this is configurable.

@asteinba
Copy link
Author

asteinba commented Apr 7, 2022

I'm also willing to work on this if you can give me a quick hint where the changes are needed :).

@Schneegans
Copy link
Owner

Hi there! Thanks for the suggestion - this is definitely something which would be of great benefit. However, to the best of my knowledge, this is impossible for a GNOME Shell extension (at least on Wayland). But I would really like to be proven wrong here!

You would need to find a way to intercept mouse events before they are passed to the client windows. The only real solution for this would be to extend Mutter, I guess. I asked a related question quite some time ago on discourse.gnome.org.

If you have an idea how to do this, I would be more than happy!

As a "workaround", I usually suggest these tools which allow you to open menus with your mouse in one or the other way:

@Lenskiy
Copy link

Lenskiy commented Jun 22, 2022

I installed ydotool as described here that is able to simulate keystrokes. For instance
ydotool key 56:1 103:1 56:0 103:0
simulate <Alt>+<Up>
You migh find this link also useful.
Then I installed xbindkeys and created ~/.xbindkeysrc with the following lines

"ydotool key 56:1 103:1 56:0 103:0"
       b:2

Now, the middle mouse button (the scroll wheel button) is translated to <Alt>+<Up>. Setting up <Alt>+<Up> as a shortcut in Fly-Pie will open it when the middle mouse button is clicked.

@Lenskiy
Copy link

Lenskiy commented Jun 22, 2022

There is another, a better and easier solution. Install input-remapper and then by running input-remapper-gtk remap the middle mouse button to <Alt>+<Up> as follows
image
Make sure to save the preset. In the case above it will be saved to mid.json.
The config file /home/$USER/.config/input-remapper/config.json should contain a clause similar to

    "autoload": {
        "Logitech M350": "mid"
    },

@claudiusraphael
Copy link

claudiusraphael commented Mar 16, 2023

There is another, a better and easier solution. Install input-remapper and then by running input-remapper-gtk remap the middle mouse button to <Alt>+<Up> as follows image Make sure to save the preset. In the case above it will be saved to mid.json. The config file /home/$USER/.config/input-remapper/config.json should contain a clause similar to

    "autoload": {
        "Logitech M350": "mid"
    },

Were you referring to sezanzeb/input-remapper?

EDIT: OOPS, sawry - just saw that it was indeed linked by Schneegans in the original response.

@Schneegans
Copy link
Owner

I'll close this issue (as it's not possible to implement from the Fly-Pie side). At the same time I'll pin it to the top of the issue list so that others may find the links to the third-party solutions more easily.

@Schneegans Schneegans closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2023
@Schneegans Schneegans pinned this issue Mar 24, 2023
@Schneegans Schneegans changed the title One hand mode (or one hand activation shortcut) One hand mode (mouse-only activation) Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants