New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 612732 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

KeyboardEvent.key value of "Space" key does not depend on actual input character on Windows

Reported by dtoybo...@gmail.com, May 18 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2739.0 Safari/537.36

Example URL:
https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html

Steps to reproduce the problem:
1. Add Sinhala keyboard layout to your Windows (from Control panel's "Add a language") and activate it
2. Open https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html with Canary.
3. Type Shift+Space

What is the expected behavior?
Then, KeyboardEvent.key value should be U+A0 (nbsp).

What went wrong?
The key value is " " (U+20, ASCII white-space). But the actual inputted character is U+A0 as expected.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? No 

Does this work in other browsers? Yes 

Chrome version: 52.0.2739.0  Channel: canary
OS Version: 10.0
Flash Version: Shockwave Flash 22.0 r0

It's always " " if the key is "Space" key?
 
Cc: dtapu...@chromium.org
Components: -Blink Blink>Input
Labels: Hotlist-Input-Dev
Owner: chongz@chromium.org
Status: Assigned (was: Unconfirmed)
Cc: garykac@chromium.org

Comment 3 by chongz@chromium.org, May 18 2016

Components: IO>Keyboard
Status: Started (was: Assigned)
Tested on Chrome Canary 52.0.2740.1 / Win 10 / Sinhala keyboard, and Shift+Space generates 'key' with expected |charCodeAt()| U+A0 for me. (Although the string still looks like " ")

May I have more information about to reproduce key value U+20?

My Steps:
1. Go to http://output.jsbin.com/titaledafi
2. Switch to Sinhala keyboard
3. Press Shift+Space

Expected result:
The "Result CharCode" is 160 (U+A0).

The behavior for key-event-test.html (key string is " ") and the "Result CharCode" (160) matches FireFox.
Labels: Needs-Feedback
Oh, I'm very sorry. I've tested with this testcase: <https://jsfiddle.net/d_toybox/4bk3v4wt/>, then, I realized that this is an issue of the test suite.

Both Chrome 51 and Firefox sets KeyboardEvent.key to U+A0 with my testcase.

So, could you close this issue as invalid?

# And sorry for the delay due to missed to catch your reply.
Status: WontFix (was: Started)
Closing as per #5

Sign in to add a comment