Karabiner-elements: How to modify key-repeat rate?

Created on 14 Sep 2016  路  12Comments  路  Source: pqrs-org/Karabiner-Elements

How do I modify the key repeat rate and the initial key repeat delay?

Thanks, keep up the good work :)

Most helpful comment

For those of you that were using the karabiner app for doing this: here are the commands to do it in terminal:
defaults write -g InitialKeyRepeat -int 10 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)

All 12 comments

For those of you that were using the karabiner app for doing this: here are the commands to do it in terminal:
defaults write -g InitialKeyRepeat -int 10 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)

I have a different edge case where I preferred the Karabiner workflow:
I used to set my repeat rates to a very fast value; I rely on it for scrolling through epically long files or through screen's scrollback buffer. I would say my value for KeyRepeat is approximately 0.15 (a non integer) for that setting. When I used legacy Karabiner on macOS 10.11, it was able to set this value correctly.

With defaults write I am unable to set a fractional value, and using 0 locks up my keyboard almost instantly (it works for a couple seconds), and while I like it fast, 0 is unusably fast.

How did Karabiner do this before? I've attached a screenshot of my previous settings:
screen shot 2016-09-20 at 10 14 47 pm

it seems like you can't set a float value between 1 and 0 either.

@paulreimer If @NiggyWizzyWoz's comment is right,

normal minimum is 15 (225 ms)

the value seems to move in 15ms increments, right? If you want to achieve 150ms, shouldn't you be setting your value to 10?

Also, defaults write can accept fractional values (use -float instead of -int) and that value will be saved but the system will still expect an int there when reading it back, so your preference will either be ignored or lead to unintended consequences.

@shariffy yup, that's the setting for InitialKeyRepeat that I'm using, BUT my issue is actually with the KeyRepeat setting instead (@4ms).

I prefer 4ms, which is only slightly above integer 0, but well below 1 (I have it set at 1 now, and it is much slower at scrolling through text than when I was using legacy Karabiner). Setting a float for this value doesn't seem to work, I think it gets ignored or rounded.

@paulreimer I see. It looks like Karabiner implemented its own timers and quite a bit of work went into that.

Might be worth keeping an issue open to document, although it's probably going to take a looooong time before it's back.

FYI: I was able to get the commands to work by logging out and logging back in again. I only realized this when I stumbled on #551, so I want to post this here for anyone else who visits this issue.

defaults write -g InitialKeyRepeat -int 10 # normal minimum is 15 (225 ms)
defaults write -g KeyRepeat -int 1 # normal minimum is 2 (30 ms)

Why there are no graphic UI to do so ? I don't want to use command line to modify this value. Because some day we may want to adjust it again, and we may forgot what command to use, and we wasted few minute or even more to search again.

@pmint93 Perhaps because those settings are already available in the standard UI for Keyboard settings in the OS itself?

I only want select keys to be faster, is there a way to do that?

would be nice if this was possible per application as well.

the mac ones is global

Was this page helpful?
0 / 5 - 0 ratings