Descriptionash: Remap Command on Apple keyboards to Control [2/2]
This is yusukes's http://codereview.chromium.org/9854025/
with my review comments applied.
chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.cc:
* Every time when a new device is added, notify the name of
the device to KeyRewriter.
* Listens to XI_KeyPress and XI_KeyRelease events to the X
root window, and notify the device ID of the event to
KeyRewriter so that the rewriter could know the source of
the next KeyPress/KeyRelease Core event.
Note that it's not possible to monitor both XI_KeyPress and
core KeyPress events for a single X window. For example, if
we monitor XI_KeyPress events in aura::RootWindowHostLinux
(by calling XISelectEvents() for the root Aura window,
xwindow_), it becomes impossible to receive KeyPress core
events for |xwindow_| in RootWindowHostLinux. It's also
impossible to convert XI_KeyPress into core KeyPress. That
is the reason why xinput_hierarchy_changed_event_listener.cc
is used to monitor XI_KeyPress/Release events.
chrome/browser/ui/views/ash/key_rewriter.cc:
* Rewrites Command key press on an Apple keyboard to Control
key press, regardless of the user preference for remapping
modifier keys.
Part 1 of 2 (Ash part): http://codereview.chromium.org/9838010/
BUG=121012
TEST=manual
TBR=sky
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=130037
Patch Set 1 #Patch Set 2 : apply my own review feedback from http://codereview.chromium.org/9854025/ #Messages
Total messages: 8 (0 generated)
|