Closed Bug 1339509 Opened 6 years ago Closed 6 years ago
Shift + Tab yields key === 'Unidentified' on Linux
STR: 1. Go to https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/code 2. scroll down to the first example; 3. Press "shift + tab" Expected: KeyboardEvent: key='Shift' | code='ShiftLeft' KeyboardEvent: key='Tab' | code='Tab' Actual: KeyboardEvent: key='Shift' | code='ShiftLeft' KeyboardEvent: key='Unidentified' | code='Tab' Chrome does it as expected.
Works as expected on Windows 8.1, fails in Xubuntu 14.04 VM.
OS: Unspecified → Linux
Summary: Shift + Tab yields key === 'Unidentified' → Shift + Tab yields key === 'Unidentified' on Linux
Masayuki probably knows what's going on here.
Priority: -- → P3
Oh, this is a simple bug.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Component: Event Handling → Widget: Gtk
Hardware: Unspecified → All
Version: unspecified → Trunk
Comment on attachment 8838475 [details] Bug 1339509 Map ISO_Left_Tab to DOM Tab key https://reviewboard.mozilla.org/r/113412/#review115342
Attachment #8838475 - Flags: review?(karlt) → review+
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/0ba503d21240 Map ISO_Left_Tab to DOM Tab key r=karlt
Comment on attachment 8838475 [details] Bug 1339509 Map ISO_Left_Tab to DOM Tab key Approval Request Comment [Feature/Bug causing the regression]: Miss mapping of KeyboardEvent.key value on Linux (Chromium maps the keysym to "Tab" correctly). [User impact if declined]: Linux users might meet this bug when web page handles Shift+Tab key with KeyboardEvent.key. [Is this code covered by automated tests?]: No. [Has the fix been verified in Nightly?]: Yes (confirmed with local build built from m-c). [Needs manual test from QE? If yes, steps to reproduce]: Can do it easy: 1. Open https://w3c.github.io/uievents/tools/key-event-viewer.html 2. Set focus to the editor. 3. Type Shift+Tab Then, "Tab" should be displayed at "key" of "UI Events" column. [List of other uplifts needed for the feature/fix]: No. [Is the change risky?]: No. [Why is the change risky/not risky?]: Just adding a mapping from native keysym, GDK_ISO_Left_Tab to "Tab". [String changes made/needed]: No.
Comment on attachment 8838475 [details] Bug 1339509 Map ISO_Left_Tab to DOM Tab key add a missing key mapping for gtk, aurora53+, beta52+ Is the lack of automated tests something we should address?
(In reply to Julien Cristau [:jcristau] from comment #10) > Is the lack of automated tests something we should address? Unfortunately, we don't have any API to emulate native keyboard event on Linux (I forgot the bug#). Although, we have it on Windows and macOS. That's the reason why I failed to detect this bug at creating the mapping table.
Reproduced the issue with an affected build (51.0, 20170118123726) using the instructions from Comment 0 on Ubuntu 16.04 x64. The output was: > KeyboardEvent: key='Shift' | code='ShiftLeft' > KeyboardEvent: key='Unidentified' | code='Tab' This is verified fixed on Ubuntu 16.04 x64 using: - 52.0b9-build2 (20170223185858), - 53.0a2 (2017-02-24), - 54.0a1 (2017-02-24) with the following output now displayed correcttly across these branches: > KeyboardEvent: key='Shift' | code='ShiftLeft' > KeyboardEvent: key='Tab' | code='Tab'
Thank you, that's the expected result!
You need to log in before you can comment on or make changes to this bug.