-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
keyboard rates on X11 are changed #76
Comments
Hi! thank you for the bug report If it occurs even after that, we can try another approach of setting the autorepeat in the uinput device itself. |
No change :( |
@vainiovano I think we need your assistance here 🙏🏽. |
Those are Xorg's default key repeat settings. The settings are probably per-keyboard, which is why they change when switching to swhkd's virtual keyboard. |
@vainiovano Is it possible to set it for the uinput device? |
we could call the get autorepeat function and pass it to uinput ? |
I think that evdev's autorepeat settings are per-fd, so Xorg can't read them, and I think that Xorg implements its own autorepeat itself anyway. |
Hmm, from checking Linux' source code (and testing with evtest) it looks like repeat settings are global. I should probably remove setting them in swhkd. Anyway, they don't affect Xorg as it ignores repeat events. |
I guess we can try to call xset rate with a shell command after uinput creation? |
if on x environment that is. |
About this issue. @loiccoyle I was thinking of adding a flag to set custom repeat rates, which will just call xset after setting up the uinput device, what do you think? |
I think that would be a reasonable work-around. Ideally, the user shouldn't have to worry about this at all though, imo. |
You are absolutely correct, I just don't have enough knowledge about the X11 protocol so I don't know how to do that automatically. |
I am looking into how It should not be too hard to communicate directly with the X11 server instead of calling I am not sure how to detect whether a server is running, though. |
What if we check if |
|
Hm that is correct, what if we approach this in |
We need the daemon online and the virtual input created before changing the keyboard rates. Could we find a way for |
I actually don't know why I didn't think of this earlier....this can fix a lot of things for us such as What if we had a initiation sequence between This sounds like a good plan, should we track this idea in a separate ticket? |
Yeah, this seems like a separate implementation plan. Regarding the X11 keyboard rates: this seems trickier than I thought it would be. I will try to push a proof of concept later in the week. |
Version Information:
uname -a
:Linux FrameWork 5.16.12-arch1-1 #1 SMP PREEMPT Wed, 02 Mar 2022 12:22:51 +0000 x86_64 GNU/Linux
swhkd -V
:swhkd 1.1.2
Describe the bug:
When on X11, the keyboard's delay and repeat rates are not respected. They get set to delay: 660 and repeat: 25.
Expected behavior:
For the keyboard rates to remain unchanged.
Actual behavior:
Keyboard rates are changed to 660 25.
To Reproduce:
The text was updated successfully, but these errors were encountered: