Fix the bug that Launcher is triggered unexpectedly
The key code which is created by KeyEvent rewriting is stored in AcceleratorHistory when the key button is pressed. However, there is no code responsible for removing it when the key button is released. Instead only the key code before KeyEvent rewriting is erased. As result, the accelerators relying on the state of AcceleratorHistory often have unexpected behavior when KeyEvent rewriting is triggered (The comment under this issue gives detailed explanation). In this CL, EventRewriterChromeOS stores the pressed keys. Based on it, EventRewriterChromeOS computes the rewritten event and the rewritten status. In addition, the test on edge cases is added. Bug: 913209 Test: unit_tests Change-Id: Ie22fe2ba8a2bd296628032723acc721db2616a77 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1477959Reviewed-by:Kevin Schoedel <kpschoedel@chromium.org> Reviewed-by:
Wez <wez@chromium.org> Reviewed-by:
Sadrul Chowdhury <sadrul@chromium.org> Commit-Queue: Andrew Xu <andrewxu@chromium.org> Cr-Commit-Position: refs/heads/master@{#638756}
Showing
Please register or sign in to comment