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

Activating Kando with a Trackpad Gesture #507

Open
ognistik opened this issue Jun 30, 2024 · 5 comments
Open

Activating Kando with a Trackpad Gesture #507

ognistik opened this issue Jun 30, 2024 · 5 comments
Labels
feature request New feature or request

Comments

@ognistik
Copy link
Contributor

Description

I think it would be great if we could enter Kando's turbo mode directly with a single trackpad gesture. I'm just discovering this app, but I find it superior to Charmstone (which I was using until now) in almost every way. Charmstone has some neat trackpad gestures to activate its menu around the cursor, though, like resting three fingers -> removing all except one, and then moving without lifting - as soon as you lift that last finger, you make your selection. I'd love a see similar intuitive gesture implemented in Kando.

Affected Desktop Environments

macOS

Additional Information

No response

@ognistik ognistik added the feature request New feature or request label Jun 30, 2024
@Schneegans
Copy link
Contributor

Yeah, this would be super cool. However, this will be most likely impossible to implement in a cross-platform manner. It seems to be possible on macOS, but I do not know whether Windows would support something like this. On Linux, it will be compositor-dependent but will require most likely admin permissions.

So maybe this would be a macOS-only feature? Are there any third-party apps which we could use on macOS to mimic this behavior? Like a gesture detection app which can open Kando once a gesture is detected?

@ognistik
Copy link
Contributor Author

I've been trying to do this with BetterTouchTool which can trigger my Kando keyboard shortcut with a gesture, it's just far from being as smooth or fluid as I think it could be—mostly because it seems BetterTouchTool trackpad actions don't seem to go well with key down/key up (so the new Turbo mode doesn't work, basically).

Just throwing this out there, I hope it can be considered. I still find what you've done with this app is fantastic and looking forward to seeing where this project goes.

@Frenzie
Copy link
Contributor

Frenzie commented Aug 18, 2024

Something that would make things more fluid would be to support something like:

kando -m "Example Menu" -t

Where -t stands for turbo mode without having to hold down Control or a mouse button. Or just as a setting, but I'd argue all of those menu behaviors should be settable through the command line invocation no matter the default.

That principle should work in most Linux gesture-providing apps anyway, or at least in fluid ones like https://github.com/natask/gestures. It can be approximated by using something like ['sh -c \'xdotool key super+space && sleep 0.2 && xdotool mousedown 1\''], which of course requires clicking at the end. But I think this would also be very nice to have with a regular mouse since it removes an unnecessary action from the equation, even if you still have to tap Control or click at the end.

The problem as it relates to the OP is that in that mode, BTN_TOUCH 1 should be treated as equivalent to mousedown/touchstart, and when BTN_TOUCH goes to 0 (= finger lifted from the touchpad/touchscreen) it should be treated as identical to mouseup/touchend.

Unfortunately I don't think Node has a nicely abstracted way to track that without resorting to something like https://github.com/sdumetz/node-evdev. It only provides those abstractions for the touchscreen. On a somewhat related note, for presumably focus-related reasons touchstart doesn't seem to fire there after showing the menu without letting go first though, at least in X11, otherwise all of this would already be functional on touchscreen.

Edit: right, so while using the touchscreen Alt+Tab or even switching workspaces doesn't seem to release touch focus on the now background app either. I'm not really sure if this is a bug or a feature, but it's definitely annoying for this specific purpose. ;-)

@D3vil0p3r
Copy link
Contributor

@Schneegans is it atleast possible, as occurs on FlyPie, to have that "touchscreen mode" where the menu icon is placed on the center of the screen with some transparency until the user clicks/taps on it?

@Schneegans
Copy link
Contributor

@D3vil0p3r technically, it could be possible. But I think that there should be better ways to summon a menu than something which always blocks your input.

And depending on your desktop environment, there are good chances that a similar behavior could be achieved already using third-party tools if you really wanted it. On KDE, you have for instance the configurable button applet, on GNOME you have the floating dock which is somewhat similar.

Still, adding this to Kando would be possible, but for me it's very low on the priority list. Maybe someone else wants to add it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants