-
Notifications
You must be signed in to change notification settings - Fork 70
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 input under high load #520
Comments
The root cause is the input loop not reacting quickly enough. When a key is missed there's a missing Separately, Unfortunately Emacs really does want to handle keypresses itself. We could handle them all ourselves and then generate keypresses (e.g. |
If tao's keyboard input was working for you. You could always try winit new-keyboard-v3 branch. I put some initial work here. You can test it out to see whether it works or not. |
I saw that: there's a lot of work landing on winit all at once (an open PR for popup windows, for instance). But I think even tao was missing events (particularly resize events when opening new frames). I'm going to try ignoring the comments saying we have to run the event loop in the main thread, stick it in a background thread and pass events as messages via a queue. This should also cure some little problems with window coding tying up emacs' own pselect loop and generally improve responsiveness. I think the tao event code works better purely because there are fewer events. What was the problem with running the winit event loop in a new thread on macos? |
2e0byo ***@***.***> writes:
I saw that: there's a lot of work landing on winit all at once (an open PR for popup windows, for instance). But I think even tao was missing events (particularly resize events when opening new frames). I'm going to try ignoring the comments saying we have to run the event loop in the main thread, stick it in a background thread and pass events as messages via a queue. This should also cure some little problems with window coding tying up emacs' own pselect loop and generally improve responsiveness.
You may want to commented out these line[0], and test whether that is
the cause. It is the fix for C-g been not working while Emacs is blocking.
What *was* the problem with running the winit event loop in a new thread on macos?
|
Annoyingly this does cure it. But I don't understand why, as
Drat. Somehow I'd missed winit's control inversion. How annoying. I might still play with |
Would you like to try out the master branch with Turns out we don't event_loop related code. We just need to register io fd using |
oh! that's cool. I'll get this building again and try it. |
Under high load or when typing rapidly, with winit (winit/glutin), keyboard input is frequently incorrect, e.g. enter becomes
m
, backspaces becomesh
, tab becomesi
. Clearly this is a translation problem between the event and the emacs key.Adding
flyspell mode
to a buffer helps when reproducing this.[I've decided to focus on glutin/winit this end, as the gtk gl code is apparently ridiculously slow. This is a bug in either gtk or hyprland, but I've not got the strength to work out which...]
[edit] to reproduce with spacemacs, hit
SPC w TAB
quickly enough and watch the complaint aboutSPC w i
not being defined.The text was updated successfully, but these errors were encountered: