event.key doesn't report correct keys with dvorak-qwerty
Reported by
keitha...@github.com,
Jul 21 2017
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36 Steps to reproduce the problem: -- Setup 1. Open System Preferences 2. Navigate to "Keyboard settings" 3. Navigate to "Input Sources" 4. Click the "+" Button 5. Search for "Dvorak" 6. Add "Dvorak - QWERTY ⌘" 7. Open Chrome 8 (Optional: visit https://keithcirkel.co.uk/keycodes which will help verifying this) -- Reproduce 1. Switch layout to "Dvroak - QWERTY ⌘" 2. Press `v` (`.` key on a QWERTY keyboard) - note that the event.keyCode is `86` and event.key is `'v'` (correct). 3. Press `k` (`v` key on a QWERTY keyboard) - note that the event.keyCode is `75` and event.key is `'k'` (correct). 3. Press `cmd+v` (`v` key on QWERTY keyboard) - note that `event.keyCode` is `86`, but `event.key` is `k` (incorrect). The expected `event.key` is `v`. What is the expected behavior? When `cmd+v` is pressed on a "Dvorak - QWERTY ⌘", then the `event.key` value should be `v`. What went wrong? When `cmd+v` is pressed on a "Dvorak - QWERTY ⌘", then the `event.key` is `k`. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 59.0.3071.115 Channel: stable OS Version: OS X 10.12.5 Flash Version:
,
Jul 25 2017
,
Jul 25 2017
Tested on Chrome Stable #59.0.3071.115 & Canary #62.0.3166.0 on Mac 10.12.5 and able to reproduce the issue. This is a non-regression issue and able to reproduce from M-51 #51.0.2695.0. Marking it as untriaged so that issue gets addressed. Note: For the builds before 51.0.2695.0, key value is displayed as “undefined”. Thanks.
,
Jul 25 2017
,
Jul 25 2017
The spec was changed from filtering "non-printable" to "non-control" characters, working on the fix. https://w3c.github.io/uievents-key/#selecting-key-attribute-values
,
Aug 2 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a49a9d8cbea209c136796e594e98c797aadeced6 commit a49a9d8cbea209c136796e594e98c797aadeced6 Author: Chong Zhang <chongz@chromium.org> Date: Wed Aug 02 20:53:47 2017 [Mac] Change DomKey filter from 'non-printable' to 'non-control' characters According to the latest spec we should filter non-glyph modifiers if the produced characters are part of Unicode 'Other, Control' General Category. e.g. http://www.fileformat.info/info/unicode/category/Cc/list.htm This patch changes implementation to match spec and fixes issues on 'Dvorak - QWERTY Command' layout. Spec: https://w3c.github.io/uievents-key/#selecting-key-attribute-values Bug: 747358 Change-Id: I792b472132ea6deb4213206593136343a2050ccd Reviewed-on: https://chromium-review.googlesource.com/585638 Reviewed-by: Gary Kacmarcik <garykac@chromium.org> Reviewed-by: Dave Tapuska <dtapuska@chromium.org> Commit-Queue: Chong Zhang <chongz@chromium.org> Cr-Commit-Position: refs/heads/master@{#491490} [modify] https://crrev.com/a49a9d8cbea209c136796e594e98c797aadeced6/content/browser/renderer_host/input/web_input_event_builders_mac_unittest.mm [modify] https://crrev.com/a49a9d8cbea209c136796e594e98c797aadeced6/ui/events/keycodes/keyboard_code_conversion_mac.mm
,
Aug 2 2017
,
Sep 26 2017
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by keitha...@github.com
, Jul 21 20173.5 MB
3.5 MB View Download
3.1 MB
3.1 MB View Download
4.4 MB
4.4 MB View Download