Closed Bug 1422663 Opened 7 years ago Closed 7 years ago

Youtube hotkeys don't work with non-english layout

Categories

(Core :: DOM: UI Events & Focus Handling, defect, P2)

57 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 1036008

People

(Reporter: a, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:57.0) Gecko/20100101 Firefox/57.0 Build ID: 20171128222554 Steps to reproduce: Hotkeys on Youtube as Shift + > or Shift + < for changing speed of the video don't work if I use russian layout in OS. With english they work fine. In chromium browsers there is no this problem. I can use hotkeys with any layout. Actual results: Nothing. Expected results: Should work.
Component: Untriaged → Event Handling
Product: Firefox → Core
Ben, please take a look at this.
Flags: needinfo?(btian)
Priority: -- → P2
PuppetWidget dispatches event to PresShell with (keyCode, charCode) = (0, 1070) for 'shift + >' and (0, 1041) for 'shift + <' on Russian layout, different from (190, 0) and (188, 0) on US layout. Checking charCode-to-keyCode mapping for Russian layout.
On Mac, TextInputHandler [1] computes correct key codes with ASCII capable keyboard layout but doesn't return for reason in [2]. The hotkeys work w/o the condition. [1] https://searchfox.org/mozilla-central/rev/652fbd6270de0d3ec424d2b88f8375ff546f949f/widget/cocoa/TextInputHandler.mm#1422-1423 [2] https://searchfox.org/mozilla-central/rev/652fbd6270de0d3ec424d2b88f8375ff546f949f/widget/cocoa/TextInputHandler.mm#1425-1431 Keep checking other platforms.
Flags: needinfo?(btian)
Reference on key code for international keyboard layouts: bug 631165 comment 0.
(In reply to Ben Tian [:btian] from comment #3) > Keep checking other platforms. Similar code in Linux https://searchfox.org/mozilla-central/rev/652fbd6270de0d3ec424d2b88f8375ff546f949f/widget/gtk/nsGtkKeyUtils.cpp#835,839
Comment 0 behavior seems expected since both keycodes mapped from ASCII capable keyboard are ignored for being neither an alphabet key nor a numeric key [2]. The behavior is consistent on Mac and Linux. Masayuki, can you confirm whether the behavior above is expected and suggest possible fix (if any)? (In reply to Ben Tian [:btian] from comment #3) > On Mac, TextInputHandler [1] computes correct key codes with ASCII capable > keyboard layout but doesn't return for reason in [2]. The hotkeys work w/o > the condition. > > [1] > https://searchfox.org/mozilla-central/rev/ > 652fbd6270de0d3ec424d2b88f8375ff546f949f/widget/cocoa/TextInputHandler. > mm#1422-1423 > [2] > https://searchfox.org/mozilla-central/rev/ > 652fbd6270de0d3ec424d2b88f8375ff546f949f/widget/cocoa/TextInputHandler. > mm#1425-1431
Flags: needinfo?(masayuki)
See bug 1036008 comment 10 and bug 1036008 comment 13. We must be able to fix this.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Flags: needinfo?(masayuki)
Resolution: --- → DUPLICATE
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.