3 ms·
I think there is no way to change this behavior: https://developer.mozilla.org/en/DOM/KeyboardEvent#Auto-repeat_on_some_GTK.C2.A0environments_such_as_Ubuntu_9.4
by jabiko 14y ago
I think there is no way to change this behavior: https://developer.mozilla.org/en/DOM/KeyboardEvent#Auto-repeat_on_some_GTK.C2.A0environments_such_as_Ubuntu_9.4 https://developer.mozilla.org/en/DOM/KeyboardEvent#Auto-repe...
- ajross 14y agoIt's a mess (the core problem is that the X server automatically generates release/press event pairs to implement key repeat which can't affirmatively be detected as "synthetic"). But it's handlable heuristically. The way I've seen it done it via a timeout on "release after a long press". If the key has been down for more than ~1 second, then hold off on interpreting a release event to see if there's a matching press already queued in the pipe or not. The timeout can be very short (the X server sends them both synchronously down the socket with no delay).