2

Recently I am running into this issue in my windows machine where if I hold down any key, the sequence of key events are key up and key down repeatedly.

On this key test website, if I hold down my TAB key, I get:

keyup    keyCode=9         which=9         charCode=0        
keydown  keyCode=9         which=9         charCode=0        
keyup    keyCode=9         which=9         charCode=0        
keydown  keyCode=9         which=9         charCode=0        
keyup    keyCode=9         which=9         charCode=0        
keydown  keyCode=9         which=9         charCode=0        
keyup    keyCode=9         which=9         charCode=0        
keydown  keyCode=9         which=9         charCode=0        
keyup    keyCode=9         which=9         charCode=0        
keydown  keyCode=9         which=9         charCode=0        
keyup    keyCode=9         which=9         charCode=0        
keydown  keyCode=9         which=9         charCode=0        
keyup    keyCode=9         which=9         charCode=0        
keydown  keyCode=9         which=9         charCode=0        
keyup    keyCode=9         which=9         charCode=0        
keydown  keyCode=9         which=9         charCode=0        
keyup    keyCode=9         which=9         charCode=0

I am pretty sure that I am not supposed to see multiple key up events. Ideally I should see multiple key down events and in the end one key up event.

I have tried changing my keyboard and that doesn't help. All my windows keyboard settings seem normal (no sticky/filter keys set up).

I am running out of ideas how to find a root cause to this issue.

Any help would be greatly appreciated.

Thanks.

  • If you solved the problem, it would help others if you would answer your own question (not just in the comments). Tell what you did, and in what part of the software you did it in. even post a pic showing the setting. After doing so the commenting could also be cleaned up (removed). – Psycogeek Aug 22 '15 at 14:04
  • Thanks for the suggestion, I will post a detailed analysis with pics/illustrations. This was a really unique problem, and I hope no one else faces such frustration as I did. – bits Aug 23 '15 at 1:18
0

Your issue is not with Windows but a consequence of how your web-browser implements keyboard handling.

For example, in Internet Explorer we get:

keydown  keyCode=9         which=9         charCode=0
keydown  keyCode=9         which=9         charCode=0
keydown  keyCode=9         which=9         charCode=0
keydown  keyCode=9         which=9         charCode=0
keydown  keyCode=9         which=9         charCode=0
keyup    keyCode=9         which=9         charCode=0

While in Firefox we get this:

keydown  keyCode=9         which=9         charCode=0
keypress keyCode=9         which=0         charCode=0
keydown  keyCode=9         which=9         charCode=0
keypress keyCode=9         which=0         charCode=0
keydown  keyCode=9         which=9         charCode=0
keypress keyCode=9         which=0         charCode=0
keyup    keyCode=9         which=9         charCode=0

You might find this reference useful. In particular, look at section 3.2. Classic Values Returned on Character Events. The only trouble is this reference seems awfully outdated. But the key principle is there. Different browsers do things differently:

When keypress events are generated for special keys, the browser needs to return some non-ASCII value to indicate which key ways pressed. We'll see that various different browsers do this in different ways.

EDIT: A more up-to-date reference.

| improve this answer | |
  • Actually, I used that website's example to simplify the problem. In reality I am having issues while playing game called Counter Strike. This did not used to happen earlier, only started to happen recently. When I hold down w key (for going forward) it fires too many individual w up and down events. So moving forward is suttering, and same happens while I keep TAB key pressed to see score. Score board flickers as if I am pressing TAB repeatedly. I tried launching Trackmania, and exactly same issues I am facing there. So its not local to one game as well. – bits Aug 19 '15 at 5:43
  • 1
    @bits Oh right, ok you really do have a problem. I suspect you have some application or utility installed that is hooking into windows' low level keyboard routines and doing bad things there. Some kind of keyboard mapping or hotkey utility? – misha256 Aug 19 '15 at 6:49
  • Exited my Autohotkey, same issue. If I goto safe mode, I don't have network so I can't test on that website. Is there a offline tool to test such key events? – bits Aug 19 '15 at 7:23
  • 1
    This question shows a Keytest software superuser.com/questions/755839/… that runs locally. and i would agree you should be testing locally. I figure it is some utility or a software for a input driver, i would be using disable/kill methods (autorun, task man, res mon) to locate any software. – Psycogeek Aug 19 '15 at 7:51
  • @misha256 and Psycogeek Thanks for brainstorming with me. I finally found the issue. The issue was being caused by both my keyboards. Both my keyboards are the same brand (Ducky Shine 3). And both of them must have been tampered by my 5 year old unknowingly in an identical way. What I found was that Ducky Shine 3 has an Auto Repeat setting to repeat key strokes at a higher rate. My son must have selected the higher rate. The way it achieves higher rates is by changing the way events are sent to the driver. – bits Aug 20 '15 at 5:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.