-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fast modifier+mouse clicks do not register (because of suspend) #16
Comments
You see in the log right there "suspending keys right ctrl"... that's why you can't use it to click with, it's suspended... |
Copying comments from other thread: I suppose we could start having flags - so people could pick and choose what type of broken they want, but I'd prefer to have no broken at all. The problem is when you hit a modifier we have to wait until we know what you want to do with it (so we don't send the WRONG key to the output)... this works great with keys, but since the mouse is invisible we can't know you want to do a multi-key gesture using the mouse. 0.4.0 just sends the wrong keys to the output and then unpresses them later, but that's why it can trigger unintentional keypresses. If we turn off suspend then #9 reasserts itself. |
Copying from the other thread: Hmm, I remember having that issue with Super in KDE, it kept opening the application launcher menu. You have to put a setting in a specific config file and restart Kwin to get it to unbind the Super key. For some reason they don't expose it in the GUI anywhere. So your suspension should bypass the issue of menus getting triggered with Alt? Main places that has bothered me is Firefox and VSCode. Isn't it primarily Alt, and perhaps Super to a lesser extent, that has this issue of unwanted actions? What if you don't do the suspension on Ctrl? Since Ctrl is used in so many direct shortcuts in Linux apps, and generally isn't used to do something on its own. Now you're going to tell me about VIM or some other popular app that uses Ctrl all by itself to do something. LOL. |
Nope but that doesn't mean it doesn't exist. In general using modifiers as normal keys (without some sort of delay) is problematic and not a thing software should be doing - for this very reason... but that ship seems to have sailed long ago.
Gnome Activity Center? Gnome binds super by default to pull up the task switcher apparatus thingy IIRC. |
Oh, right. I always install Kinto immediately after installing any Linux distro it's compatible with, and it always does a good job unbinding the Super key (except in KDE). So I tend to forget about that behavior in GNOME. I bend GNOME to my will. Mwahahahaha! I am very used to modifier keys not doing things on their own, from Windows (pre-special Windows key days) and macOS, where modifiers just tend to be passive modifiers that change the action of other things. I found the action of Super in GNOME quite aggravating. Fortunately Kinto fixes that. So suspend modifiers to keep them from doing things on their own, which I would generally be a fan of, but the modifier is needed to change the action of a click. This is a bit of a sticky problem, no pun intended. With Kinto I guess I just stayed away from using the Alt key shortcuts too much with apps that have Alt-activated menus, so the defect hasn't really bothered me too much. Doesn't |
Yeah, I just don't love the idea... it should work already... just run it and make sure it's reading from both devices: (you'll of course need your own file names)
I can Cmd-Click on links in browser just fine. |
Of course now my mouse is slow again because it's an entirely different input device.... |
Looks like it would be I ran it like this and it still doesn't Cmd+click without waiting past the suspension time.
|
Do you see the button clicks in the output? They should turn off suspend. |
Don't see any evidence of button clicks in the output, even if I hold the modifier past the suspension time. Maybe I'm using the wrong mouse device.
I'll try other devices from the list (which by the way I have to run the Kinto branch to see the whole device list like this, not sure how to get it out of your branch):
I'll try the "i2c" devices. |
There is |
Tried with
Got it. |
Then you need device 8 (you need the BTN events)... all events should pass thru... run Ah I know, it's that we don't support those events on the other side... |
https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h#L839 You'll need to extend the UInput device to perhaps cover more of EV_REL or perhape EV_ABS... you should get an idea by running EVTEST... |
https://python-evdev.readthedocs.io/en/latest/_modules/evdev/uinput.html You could also perhaps try At soe point too much capability is bad though as that's why we currently have code to prevent us from being mistaken as a joystick - although that's before my time and I dunno what happens if we are mistkaen as a joystick. |
I'd be tempted to try the from_device stuff properly but hotplug complicates all that since you have to change the capabilities of the device on the fly. |
Pretty hard to get a "short" snippet of the touchpad device. It's very chatty in the output with even the slightest touch. But here's the tail end of some touches and clicks.
|
Yeah minimally you mway want everything up to ABS_MAX... you could probably do it briefly with something like: return UInput(events={ecodes.EV_KEY: _keyboard_codes,
ecodes.EV_REL: set([0,1,6,8,9]),
ecodes.EV_ABS: set(range(0,0x3f))
}) |
Thus allowing our virtual output device to communicate all those ABS touchpad events... I don't think |
I really wish there was a way to just subscribe to specific events from a device, but I don't think that is a thing - really we don't even need to grab the trackpad/mouse - we just need to listen to it. I think that's doable - but then I think we still have to listen to every single event it fires and filter them out in Python. |
Closing this in favor of #20... once you add the clicking device Cmd-clicking works just fine. |
Update: Of course this "just works" if you ALSO add your mouse as a device because the mouse buttons will trigger the modifiers to be un-suspended so that they can apply to the mouse button "keys".
If this works for everyone should this just be the solution? Finally a good reason to add
add_device
helper to the config file?Output from start to trying to Ctrl+click a link. I held Ctrl for only a fraction of a second, which is how I frequently do it.
Not a big fan of the more "chatty" type applications like Discord, but if that's easier for you...
Originally posted by @RedBearAK in #14 (comment)
The text was updated successfully, but these errors were encountered: