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

How to modify key-repeat rate? #10

Closed
ig0rsky opened this issue Sep 14, 2016 · 13 comments
Closed

How to modify key-repeat rate? #10

ig0rsky opened this issue Sep 14, 2016 · 13 comments

Comments

@ig0rsky
Copy link

ig0rsky commented Sep 14, 2016

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

Thanks, keep up the good work :)

@ig0rsky
Copy link
Author

ig0rsky commented Sep 15, 2016

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)

@ig0rsky ig0rsky closed this as completed Sep 15, 2016
pansen added a commit to pansen/dotfiles that referenced this issue Oct 15, 2016
@paulreimer
Copy link

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

@ig0rsky
Copy link
Author

ig0rsky commented Oct 16, 2016

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

@shariffy
Copy link

@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.

@paulreimer
Copy link

@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.

@shariffy
Copy link

@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.

machupicchubeta added a commit to machupicchubeta/dotfiles that referenced this issue Jan 9, 2017
@BrunoGrandePhD
Copy link

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)

@pmint93
Copy link

pmint93 commented Aug 2, 2017

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.

@ig0rsky ig0rsky reopened this Aug 5, 2017
@ig0rsky ig0rsky closed this as completed Aug 5, 2017
@neverfox
Copy link

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

@ghost
Copy link

ghost commented May 23, 2018

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

@momomo
Copy link

momomo commented Sep 2, 2020

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

@momomo
Copy link

momomo commented Sep 2, 2020

the mac ones is global

@momomo
Copy link

momomo commented Apr 13, 2023

correction, would be nice to be able to declare the key repeat for the to in complex:

"to": [
      {
        "key_code": "down_arrow",
        "modifiers": [
          "left_shift"
        ]
      },
      {
        "key_code": "down_arrow",
        "modifiers": [
          "left_shift"
        ]
      },
      {
        "key_code": "down_arrow",
        "modifiers": [
          "left_shift"
        ]
      },
      {
        "key_code": "down_arrow",
        "modifiers": [
          "left_shift"
        ]
      },
      {
        "key_code": "down_arrow",
        "modifiers": [
          "left_shift"
        ]
      }
    ],
    "type": "basic"

As of now, these are repeating too fast or too slow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants