• David Reveman's avatar
    exo: Improve keyboard pressed key tracking. · e8969644
    David Reveman authored
    After some testing we have determined that the following
    pattern results in a more appropriate behavior when sending
    key press/release events to clients:
    
    - Send key press events if they have not been handled and
      are not already pressed.
    - Send key release events if they are currently pressed.
    
    This should reduce the chance that a client ends up with
    an inappropriate keyboard state where some keys are
    incorrectly pressed.
    
    Bug: 820641
    Test: exo_unittests --gtest_filter=KeyboardTest.OnKeyboardKey
    Change-Id: Ica7b5510928056b6659140cf492e40234a272053
    Reviewed-on: https://chromium-review.googlesource.com/1038907Reviewed-by: default avatarDaniele Castagna <dcastagna@chromium.org>
    Commit-Queue: David Reveman <reveman@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#555389}
    e8969644
keyboard.cc 13.4 KB