New issue
Advanced search Search tips

Issue 727409 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: 2017-06-15
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

Dvorak-QWERTY-commands layout has incorrect keyCode when option key pressed

Reported by and...@darknoon.com, May 29 2017

Issue description

I was asked by the vscode team to report this issue against chromium:

https://github.com/Microsoft/vscode/issues/27345#event-1100064236
VSCode version is "Version 1.12.2 (1.12.2)"

Chrome Version       : n/a 
OS Version: OS X 10.12.5
URLs (if applicable) :
Other browsers tested:
  Add OK or FAIL after other browsers where you have tested this issue:
     Safari 5:
  Firefox 4.x:
     IE 7/8/9:

What steps will reproduce the problem?
1. Press cmd-option-R
no effect

What is the expected result?
1. triggers show in finder command

What happens instead of that?
1. Pressing cmd-option-O will trigger the command


 

Comment 1 by alex.d...@gmail.com, May 30 2017

Reduced test case:

* on OS X, change the keyboard layout to use Dvorak - QWERTY ⌘
* go to https://jsfiddle.net/v1gz5c5m/1/
* this is a page that logs the values for code, keyCode and key that are generated by Chromium on the keydown event

* you have to be very fast, as the keypress will trigger a browser reload, but please observe:

 * pressing Cmd+R => keyCode: 82 <--- this is correct as it is equal to 0x52 which is AFAIK the keyCode for the R key ( https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx )

 * pressing Cmd+Option+R => keyCode: 80 <--- this is unexpected, it should be 82 again

Anyways, it is not clear to me if this is how this specific keyboard layout works or if this is a bug in Chromium (what the OP claims). In any way, we are stuck in VS Code.

Thank you for your awesome work!

Comment 2 by meh...@chromium.org, May 31 2017

Components: UI>Browser>Core

Comment 3 by and...@darknoon.com, May 31 2017

I tried the jsfiddle in Safari and saw the same bug, maybe it dates back to the shared heritage in webkit?

Comment 4 by and...@darknoon.com, May 31 2017

Here is a fork of the fiddle with preventDefault so you don't leave the page:
https://jsfiddle.net/sf73k2a4/

Comment 5 by meh...@chromium.org, May 31 2017

Components: Blink
+label:blink which is probably more suitable.

Comment 6 by kojii@chromium.org, Jun 1 2017

Components: -Blink Blink>Input
Labels: Needs-Feedback
NextAction: 2017-06-15
Why do you need to use keyCode? There are a number of situations where keyCode is broken are you able to get away from using keyCode and use key and code?
I can't speak for the vs code team, but they tried to change away from using keyCode for keyboard commands and it ended up breaking my keyboard layout for all commands (not just the ones with option held down):

https://github.com/Microsoft/vscode/issues/23986

Project Member

Comment 9 by sheriffbot@chromium.org, Jun 1 2017

Cc: dtapu...@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "dtapuska@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Unconfirmed)
This is the same behavior as in Safari and is actually the value returned to use from the operating system.

The code checks to see if it can convert the char to a windows key code and if it can't it looks at the character without modifiers applied and returns that. The OS is returning us this value and it isn't applying the Command map either so the value is turning out to be 80.
The NextAction date has arrived: 2017-06-15

Sign in to add a comment