-
Notifications
You must be signed in to change notification settings - Fork 216
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
Mitigation for unreliable macros #678
Comments
Interesting, wonder if I could turn this into a throttle that is only enabled if a param is passed - ex. |
The printed output seemed to show an excessive amount of press/release events for keys that weren't part of the shortcut, especially RIGHT_CTRL, but also LEFT_SHIFT. This doesn't happen with mainline Clearing up the source of the extra events should put a lot less pressure on the |
@RedBearAK You interested in testing alpha versions of keymapper or only beta/release? I've been working on a big rethink. |
@RedBearAK One other thing you could test if you want is to DROP non-key inputs... def on_event(event, device_name, quiet):
# we do not attempt to transform non-key events
if event.type != ecodes.EV_KEY:
_output.send_event(event) # REMOVE THIS LINE
return All I've ever seen come thru there are scancode and SYNs (paired with the scancodes and key events)... come to think of it that means we're also doubling up SYNs on the output as well (and sending a SYN for every SYN!), which can't help matters any. What would happen if you just removed that line and we just DROPPED all the scancodes and related SYNs on the floor and only passed key events? |
Short answer, yes. Although I might need some pointers here and there to get the full log results you would probably be looking for in testing such early iterations. Hope we can work on things like the first modifier key press after restarting Anyway, I have the ability to set up VMs quickly in Boxes, and test in a clean snapshot state and revert if necessary. Shouldn't be too much trouble to test even alpha stuff, within reason. I am in the midst of working on adding a scheme for Mac-style Option-key special character input to the Windows version of Kinto (AutoHotKey): I can't help but think it shouldn't be too difficult to add this kind of "dead keys" ability to Then there's the I don't know exactly which directions you were planning on going with either Kinto or xkeysnail, but these are things I would be very interested in seeing added or improved. My main/only reason to be using |
I found the function in Tried just sticking that snippet in at the top of the function and got:
Mainline Does this need another new |
Sorry, nevermind... I forget how much I've changed things already. :) |
Never seen this. Of course what I'm using now has an entirely rewritten input pipeline.
Can't we do that here already with just a simple nested mapping? Of course you'll only be able to output keys that actually exist in the kernel keyboard map, not any random UTF-8 character... the disadvantage of being low-level... |
I'm putting the reply to this in the "Umlaut" thread: |
Thanks, I've never seen that thread. :) I'm more worried about basic modifiers right now than typing complex accented characters, but that's awesome that you're pushing this forward. |
@rbreaves
After some lengthy discussion on an
xkeysnail
issues thread, it seems the problem I've run into on multiple machines and multiple Linux distros with multi-key macros behaving unreliably might actually stem from the Kinto patched version ofxkeysnail
. I can't replicate the problem with the unpatchedxkeysnail
branch, and I tried pretty hard.Found a relatively innocuous mitigation measure, thanks to @joshgoebel. Insert a tiny delay into
output.py
.Take this:
Turn it into this:
Yes, that is literally just 1ms of delay, the smallest possible with
time.sleep()
. Yet it takes my main Ryzen 3700u laptop with Ubuntu 22.04 from about 50% reliability with macros like the Firefox preferences shortcut to about 99% reliability with that and even longer macros. Without this I would often have to do Cmd+comma two or even three times before it worked properly in Firefox to open the preferences.No idea how or why this works, or why the macro errors only seem to happen with the Kinto branch.
The text was updated successfully, but these errors were encountered: