-
Notifications
You must be signed in to change notification settings - Fork 153
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
Defaulting keystroke_sleep_ms to 0? #335
Comments
It looks like if I spam from one button to another that is using the same modifier it sometimes ignores. So if I have 1 button set to alt+1 and another to alt+2 if I press the alt+2 binding and then very shortly after use the alt+1 binding it ignores the modifier and instead just sends 1. |
I think setting keystroke_sleep_ms to 0 seems to have solved it. |
let me know if setting this to 0 makes you face any other issues. This was needed at some point because my environment would ignore the injections otherwise. Maybe this is not an issue anymore. I need to conduct some more tests. Maybe I can at least lower the default to 5ms or even less |
what is the highest setting that still works for you? |
@Doxmiatoo any update, are you facing any issues after setting it to 0? |
TODO:
|
related: #292, there is a sleep for modify, which I think caused the problem there |
Zero issues; I’ve also tested it with 2 and had no issues. |
awesome, thanks for letting me know! What does |
we can set |
it works perfectly fine with 0 for me, on both gnome on wayland and x11, and xfce on x11. strange |
yes, lets set that to 0 on the beta branch please |
I spent a while earlier totally confused about why my keys were working inconsistently. I couldn't see any obvious indicator of why it doesn't work as expected, nor any timing delay on output from With delay 20, works for me every time:
With delay 0, does not work ever (in Wine):
As far as I can tell, the keys are leaving the faked device perfectly well, it's probably something external to the program and thus system dependent that causes it to not register correctly. :( Were you using Wine previously when noticing the issue, because I am, and it works with 0 for me in KWrite, Firefox, and other native apps, but it didn't work in a game running through Wine (specifically, FFXIV in this case). It turned out that the default of 10ms was long enough for it to work most of the time in Wine, but sometimes the modifier key wouldn't go through in time and the unmodified key went though instead. If I hadn't found this thread about this setting and played around with it I very likely never would have known the issue and given up on the approach entirely, because it's a type of silent failure that makes you think it's just incompatible in some way. Because my primary use was for within a game, I didn't even think to test outside the game in native apps until seeing the outputs (above) and realising it probably wasn't input-remapper at fault at all! Please make this setting visible in the GUI so at least when things don't work people know it's there and can fiddle to find a solution! As 10 appears to be on the cusp of (not) working in Wine it's probably a poor default. The valuable options might be 0 (I use native apps only), 20 (I need to use Wine), and an option to custom set it? I'm running a near fresh install of KDE Neon 5.24 on x11. |
Thanks a lot for your insight, it's very valuable!
that probably has to happen then, yes
Possible. I made this app specifically because of a game I was playing back then that runs in wine. But I don't really remember where I actually encountered the issue to be honest. |
Maybe we should ask in the wine forum https://forum.winehq.org/index.php if this is a bug and if other people can reproduce it as well (I'll try it in wine later in the evening probably) and then possibly open a bug report at https://bugs.winehq.org/ |
I think I'd only add it to the gui after asking around in the forum. Maybe this is a wine problem that can be fixed at some point. We could start a troubleshooting readme file and mention this |
I was just testing to set it to zero on the beta branch. There seems to be a other bug: in the test I could set it to 1 without any problem. should I do that for now? |
If someone else can replicate the bug also occurring only in Wine then it's probably a good next step! FWIW, if you have any trouble replicating the issue, exactly what I've done is making my mouse side keys act as a conditional modifier for my keyboard number keys, but not to block clicks otherwise so they still work normally for every other context. This is fine with 0 delay in native apps. I have on my mouse:
|
yeah, that makes sense. It is an infinite loop after all as long as the key is held down
Or we add a 1 ms sleep to |
Oddly enough I only use it in wine since I remap a gaming Razer Tartarus v2. I play almost exclusively WoW and FFXIV in wine and have had zero issues with it at 0. |
It pretty possible that there's some system dependent difference as well that introduces that delay in Wine. Knowing that there's some application dependent factor though means that testing to try to find other apps that may share the same behaviour - or specific Wine or system configurations - is at least a path that can plausibly find a cause! Knowing that it isn't universal for Wine is helpful to know though, knowing the OSes and system environments in use is probably necessary to narrow it down. |
sorry, I forgot about this. I just tried it with 0 in wine and it works for me I'll do the following later:
|
the wine bug report guidelines want us to try it on the latest development version: https://wiki.winehq.org/Bugs, can you reproduce the problem there? |
see gvalkov/python-evdev#187 (comment) and https://gitlab.freedesktop.org/libinput/libinput/-/issues/857
|
I rapidly press my keys when gaming and I've found when I spam press buttons over and over occasionally if I have a key set to an modified key (ie: Control_L + 3) every now and then it will just press 3. Is there any config or way to set it up where I won't have this happen?
The text was updated successfully, but these errors were encountered: