Closed Bug 1256618 Opened 5 years ago Closed 5 years ago
Elements cannot be activated by clicking remote control
Step to reproduce: 1. connect to a nexus player with B2G installed, and the remote control is already paired. 2. in settings app, navigate to an element with sub-menu, e.g. Wi-Fi. 3. click the button located in the center of direction keys. Result: nothing happened Expected result: entering sub-menu  mentions we should activate the element by some kind of trigger, but in , only |NS_VK_RETURN| is handled. My experiment is that the element can be triggered successfully by add support for |VK_SELECT|. Are we going to support more keys such as 'Accept' or 'Select' listed in ?  https://www.w3.org/TR/DOM-Level-3-Events/#event-flow-activation  https://dxr.mozilla.org/mozilla-central/rev/d6ee82b9a74155b6bfd544166f036fc572ae8c56/dom/base/Element.cpp#3045  https://www.w3.org/TR/DOM-Level-3-Events-key/
Comment on attachment 8730653 [details] [diff] [review] 0001-Add-VK_SELECT-support.patch Does the remote control has a button to cause VK_RETURN? If not so, I think that the button located in the center of direction key should cause VK_RETURN because the remote control cannot use on some web pages which listen to Enter key events.
Chromium also maps DPAD_CENTER to VK_RETURN: https://code.google.com/p/chromium/codesearch#chromium/src/ui/events/keycodes/keyboard_code_conversion_android.cc&q=KEYCODE_DPAD_CENTER&sq=package:chromium&type=cs&l=463
Thanks @masayuki, then we should change the mapping from NS_VK_SELECT to NS_VK_RETURN here: https://dxr.mozilla.org/mozilla-central/source/widget/gonk/GonkKeyMapping.h#50
Another question: should we also change the key name mapping from "Accept" to "Return" at https://dxr.mozilla.org/mozilla-central/source/widget/NativeKeyToDOMKeyName.h#355 ? The key code / key name mapping looks not synchronized to me.
(In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment #4) > Another question: should we also change the key name mapping from "Accept" > to "Return" at > https://dxr.mozilla.org/mozilla-central/source/widget/NativeKeyToDOMKeyName. > h#355 ? Perhaps, yes. But please keep it. The attribute is still experimental until Chrome supports it in default settings. And I'll update some key values at once for conforming to the latest draft. > The key code / key name mapping looks not synchronized to me. Yes. key values are clearer defined but keyCode isn't defined by any standards. Therefore, keyCode is decided with the other browser's behavior.
Seems S.C. already answered the questions
Review commit: https://reviewboard.mozilla.org/r/40735/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/40735/
Attachment #8731586 - Flags: review?(masayuki)
Comment on attachment 8731586 [details] MozReview Request: Bug 1256618 - change VK_SELECT to VK_RETURN; r=masayuki https://reviewboard.mozilla.org/r/40735/#review37501 Let's try this.
Attachment #8731586 - Flags: review?(masayuki) → review+
You need to log in before you can comment on or make changes to this bug.