New issue
Advanced search Search tips

Issue 737029 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 775743
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug-Regression



Sign in to add a comment

CapsLock on external USB keyboard does not generate keyup event in Javascript

Reported by sergey.s...@gmail.com, Jun 27 2017

Issue description

UserAgent: Mozilla/5.0 (X11; CrOS x86_64 9460.60.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.91 Safari/537.36
Platform: 9460.60.0 (Official Build) stable-channel link

Steps to reproduce the problem:
1. Connect an external USB keyboard to a Chromebook.
2. Install and run the Chrome Key Event Tester app (https://chrome.google.com/webstore/detail/chrome-key-event-tester/amndppkiecbdmiaihgbicalhabkkhhpk?hl=en)
3.Press and release Caps Lock key on the external keyboard.

What is the expected behavior?
There should be keydown and keyup events:
+CapsLock-Capslock

What went wrong?
Only keydown event is generated:
+CapsLock

Debug log:
1693:JavaScript 'keydown' event = {"type":"keydown","charCode":0,"keyCode":20,"repeat":false,"code":"CapsLock"}
1695:PNaCl KeyboardInputEvent = {"type":"KEYDOWN","modifiers":512,"keyCode":20,"characterText":"","code":"CapsLock"}

Did this work before? Yes 58

Chrome version: 59.0.3071.91  Channel: stable
OS Version: 9460.60.0
Flash Version: Shockwave Flash 26.0 r0

This works correctly in the Chrome browser on Windoews platform.
Also, this bug can be observed in CRD https://chrome.google.com/webstore/detail/chrome-remote-desktop/gbchcmhmhahfdphkhkmpfmihenigjmpp?hl=en): 
If you press CapsLock once on an external keyboard, the remote session will be stuck in Caps mode.
 
This problem is not unique to an external USB keyboard. It also occurs if a search  button on the builtin keyboard remapped to CapsLock. 

Comment 2 by zork@chromium.org, Sep 21 2017

Components: UI>Input>Text
Cc: afakhry@chromium.org
Owner: weidongg@chromium.org
Status: Assigned (was: Unconfirmed)
Weidongg, is that something related to your recent capslock change?
Caps-Lock is now an accelerator. So it is handled by accelerator controller before it reaches the tester app. If you try search+alt to toggle caps lock, you would see either alt-up or search-up is missing, which is the same reason.

For other accelerator like shift+alt+i, you will see both up and down key event in the tester app, but the feedback dialog will not open, because I think it is handled by the app.
Mergedinto: 775743
Status: Duplicate (was: Assigned)

Sign in to add a comment