DescriptionAutomatically remap Command key on an Apple keyboard to Control [part 2 of 2 - Chrome part]
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=chromium-os:25097
TEST=try
Patch Set 1 : rebase #Patch Set 2 : review #Patch Set 3 : win_aura fix #
Total comments: 18
Patch Set 4 : rebase #Messages
Total messages: 3 (0 generated)
|