Skip to content
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

Key repeat not working on MacOS #106

Open
metalelf0 opened this issue Jan 26, 2021 · 6 comments
Open

Key repeat not working on MacOS #106

metalelf0 opened this issue Jan 26, 2021 · 6 comments
Labels
bug Something isn't working has-workaround help wanted Extra attention is needed

Comments

@metalelf0
Copy link

I'm currently on MacOS 11.1 and the key repeat isn't working: holding a key only sends a single char event. Not a big deal, it's like a "hardcore mode" built in, but some users might find it useful :)

Keep up the great work!

@smolck smolck added bug Something isn't working gui Bugs or enhancement related to GUI elements and removed gui Bugs or enhancement related to GUI elements labels Jan 26, 2021
@smolck
Copy link
Owner

smolck commented Jan 26, 2021

@metalelf0 Hello, thanks for the issue! This is something I have actually noticed myself, but I haven't taken the time to look into it yet. Hopefully I'll be able to do so soon!

@smolck
Copy link
Owner

smolck commented Jan 26, 2021

Hmm, so after some further looking into it, I think this is actually a macOS preferences thing. If you go into System Preferences > Keyboard, you can change the values for Key Repeat and Delay Until Repeat to what you want.

That is system-wide though. There might be a way to do it on an application-specific basis, but I'm new to macOS and so wouldn't know; regardless, I think this can be closed, since this isn't an uivonim issue? Unless I'm mistaken?

@metalelf0
Copy link
Author

Hmm, my system settings are already on very fast keyboard repeat, so it shouldn't be related. I'll try to look into this as well and I'll let you know if I find anything relevant.

@smolck smolck added the help wanted Extra attention is needed label Jan 26, 2021
@metalelf0
Copy link
Author

Have you already seen https://github.com/xtermjs/xterm.js/pull/1849/files ? I'm no js/electron dev, but this seems related.

@smolck
Copy link
Owner

smolck commented Jan 26, 2021

So, based on that PR (which I had not seen, so thank you for mentioning it) and if I understand correctly, I'd need to use different events (or change up some logic) to get keypresses in normal mode so holding a key down repeats as expected, but when in insert mode the hold dialog appears as intended. This may or may not work/be feasible though, so I'll have to try it out and go from there.

For the time being though, you can run this command as a workaround:
$ defaults write -g ApplePressAndHoldEnabled -bool false

Of course, having to do that for a single application to work as desired is not ideal, so hopefully there's a straightforward solution (likely based on the one in that PR).

@xukai92
Copy link

xukai92 commented Feb 20, 2021

defaults write com.uivonim.uivonim ApplePressAndHoldEnabled -bool false should do it for a single app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working has-workaround help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants