exo: Fix key event rewrite support.
Use a map to track pressed keys. The key for the map is the physical code that was pressed and the value is a potentially rewritten code. This allows us to generate appropriate release events when physical keys are released, while still allowing the event rewriting logic to work as expected. Note: Exo clients will always see a release for the same code as the code that was generated when the physical key was pressed. This is necessary in order to not break client side keyboard state tracking and might not match the events that are generated internally. That is because event rewrite logic is usually not rewriting both the press and the release events, often just the press event. Bug: 847500 Test: exo_unittests --gtest_filter=KeyboardTest.OnKeyboardKey Tbr: hidehiko@chromium.org Change-Id: I23240304bd377e3855971edd079ade1b537a74f9 Reviewed-on: https://chromium-review.googlesource.com/1112967Reviewed-by:Daniele Castagna <dcastagna@chromium.org> Commit-Queue: David Reveman <reveman@chromium.org> Cr-Commit-Position: refs/heads/master@{#570074}
Showing
This diff is collapsed.
Please register or sign in to comment