How to set keyboard repeat (in terminal)


#1

Hi,

There is normally a setting for keyboard in all OSes to set “key repeat delat” and “key repeat rate” so when you continue pushing a key, it will repeat. In C9 there is no such setting. This is bothering specially in terminal applications like vim where you need to repeat some commands most of the time.

How can I have this?


#2

Cloud 9 just follows your local key repeat rate. We can’t control that since the repetition is interpreted by your client side OS. As you said, all OSes have a setting for it already.


#3

If you are using mac osx you can enable repeating keys with
defaults write -g ApplePressAndHoldEnabled -bool false see here for details


#4

Key repeat is messy business on OS X. ApplePressAndHoldEnabled is the likely cause of the problem. I’ve previously done some research, and some browsers actually trigger repeat events.

Holding down x in a normal textarea does not repeat. Nevertheless, based on http://unixpapa.com/js/testkey.html, it looks like keydown events are fired.

The properties of the event are slightly different for each browser:


Chrome 42.0.2311.90

keydown  keyCode=88  (X)   which=88  (X)   charCode=0        
         key=undefined char=undefined location=0 repeat=false
         keyIdentifier=U+0058   keyLocation=0
keypress keyCode=120 (x)   which=120 (x)   charCode=120 (x)  
         key=undefined char=undefined location=0 repeat=false
         keyIdentifier=U+0058   keyLocation=0
keydown  keyCode=88  (X)   which=88  (X)   charCode=0        
         key=undefined char=undefined location=0 repeat=true
         keyIdentifier=U+0058   keyLocation=0
keydown  keyCode=88  (X)   which=88  (X)   charCode=0        
         key=undefined char=undefined location=0 repeat=true
         keyIdentifier=U+0058   keyLocation=0
keyup    keyCode=88  (X)   which=88  (X)   charCode=0        
         key=undefined char=undefined location=0 repeat=false
         keyIdentifier=U+0058   keyLocation=0

Safari 8.0.4 (10600.4.10.7)

keydown  keyCode=88  (X)   which=88  (X)   charCode=0        
         key=undefined char=undefined location=0 repeat=undefined
         keyIdentifier=U+0058   keyLocation=0
keypress keyCode=120 (x)   which=120 (x)   charCode=120 (x)  
         key=undefined char=undefined location=0 repeat=undefined
         keyIdentifier=         keyLocation=0
keydown  keyCode=229       which=229       charCode=0        
         key=undefined char=undefined location=0 repeat=undefined
         keyIdentifier=U+0058   keyLocation=0
keydown  keyCode=229       which=229       charCode=0        
         key=undefined char=undefined location=0 repeat=undefined
         keyIdentifier=U+0058   keyLocation=0
keyup    keyCode=88  (X)   which=88  (X)   charCode=0        
         key=undefined char=undefined location=0 repeat=undefined
         keyIdentifier=U+0058   keyLocation=0

Firefox 38.0

keydown  keyCode=88  (X)   which=88  (X)   charCode=0        
         key=x char=undefined location=0 repeat=false
         keyIdentifier=undefined keyLocation=undefined
keypress keyCode=0         which=120 (x)   charCode=120 (x)  
         key=x char=undefined location=0 repeat=false
         keyIdentifier=undefined keyLocation=undefined
keydown  keyCode=88  (X)   which=88  (X)   charCode=0        
         key=x char=undefined location=0 repeat=true
         keyIdentifier=undefined keyLocation=undefined
keydown  keyCode=88  (X)   which=88  (X)   charCode=0        
         key=x char=undefined location=0 repeat=true
         keyIdentifier=undefined keyLocation=undefined
keyup    keyCode=88  (X)   which=88  (X)   charCode=0        
         key=x char=undefined location=0 repeat=false
         keyIdentifier=undefined keyLocation=undefined

#5

Well, it doesn’t. Just now I understood that this is the browser’s behaviour “Google Chrome”. In every other app (e.g. iTerm) I have correct settings but Chrome does not respect those settings. (This is the case for Finder too)


#6

I’d love to have key repeat working, please. When I visit http://unixpapa.com/js/testkey.html and hold down a key – it repeats. But in the c9.io terminal, the key does not repeat. This is a big deal. Is there an update on how to fix this please?

Alternatively, can I ssh into a c9.io workspace instead of using the browser in the terminal?

Thanks


#7

@payne when it repeats it doesn’t send the correct character, and there is no way to prevent the popup. Did you try the solution from How to set keyboard repeat (in terminal)
defaults write -g ApplePressAndHoldEnabled -bool false ?