Skip to content
Commit f925a1ac authored by danakj@chromium.org's avatar danakj@chromium.org
Browse files

Use 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/

Review URL: https://chromiumcodereview.appspot.com/11417144

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170415 0039d316-1c4b-4281-b951-d872f2087c98
parent 3b18b688
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment