DescriptionUse rewriting to make ChromeOS keyboard F<number> keys produce extended keycodes.
This makes the ChromeOS keyboard F<number> keys produce keycodes such as
BROWSER_BACK, VOLUME_UP, POWER, etc. We can then remove special-cases for
ChromeOS accelerator bindings, and allow the same bindings to work on all
platforms including ChromeOS. The ChromeOS keyboard, and external keyboards
with these extra keys will also rely on and fire the same bindings for these
keys, unifying the code path.
The other advantage of this, is that now ChromeOS does not need to bind
F<number> keys in a non-standard way. So, an external keyboard plugged
into a Chromebook can still use the F<number> keys in the same way as they
would when it was plugged into their desktop. This behaviour isn't yet
possible, as the event rewritter is not aware if the event came from the
ChromeOS keyboard or an external keyboard, but is a 1-line change once this
information is known.
Lastly, when the Search key acts as Function key option is enabled from
https://codereview.chromium.org/11421055/ then Search-1 through Search-0
produce the keycode F1 through F10, and Search-- and Search-= produce F11 and
F12. This allows applications to easily rely on these keys and consume them the
same way on desktop as on a Chromebook.
R=yusukes@chromium.org
BUG=162268
TEST=unit_tests:EventRewriter.TestRewriteFunctionKeys
Depends on: https://codereview.chromium.org/11421055/
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=170415
Patch Set 1 #
Total comments: 8
Patch Set 2 : Address Feedback #Patch Set 3 : Rebase #
Total comments: 9
Patch Set 4 : NitFixin #Patch Set 5 : UMA stuff #Patch Set 6 : Detect Chromebook keyboard #
Total comments: 1
Patch Set 7 : chromeboxkeyboard #
Total comments: 10
Patch Set 8 : reviewed #Patch Set 9 : nit #Patch Set 10 : static const #
Total comments: 2
Patch Set 11 : Helper method do keysym mapping #
Total comments: 9
Patch Set 12 : for landing #Patch Set 13 : forlanding2 #Patch Set 14 : forlanding3 #Messages
Total messages: 27 (0 generated)
|