draft-js icon indicating copy to clipboard operation
draft-js copied to clipboard

Key-repeat does not work for letters

Open andsens opened this issue 10 years ago • 3 comments

On OSX 10.11.3 key repeat works for everything except normal letters.

Expected behavior: When holding down a letter key (with or without shift) the editor repeats the letter according the rate and delay set for key-repeat in the OS

Actual behavior: The letter is only output once and the key has to be hit again to repeat the letter. The mouse cursor flashes in sync with the expected key-repeat but nothing happens.

andsens avatar Feb 26 '16 11:02 andsens

Interesting, works in both Chrome and Safari on 10.10.5 for me.

sophiebits avatar Feb 26 '16 15:02 sophiebits

This also didn’t work for me initially, but…

It‘s probably an OS settings issue. Try doing the same key-holding behavior in the browser’s URL bar. My guess is that it doesn’t work there either.

I had to make a change to my system settings via Terminal. Just paste this line, hit enter, then restart any app that is misbehaving: defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false

After this change, the example on the Draft.js homepage works for key-repeat.

gscottolson avatar Feb 26 '16 15:02 gscottolson

You're right! I am using chrome and the omnibar didn't work with key-repeat either. Running your defaults write worked. Thanks @gscottolson :-) Closing as a non-issue.

andsens avatar Feb 26 '16 15:02 andsens