New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 820641 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2018
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Linux apps: keys get stuck

Project Member Reported by tbuck...@chromium.org, Mar 9 2018

Issue description

Chrome Version: 66.0.3359.10 dev
OS: Chrome 10452.1.0

What steps will reproduce the problem?
(1) Install VS Code
(2) Start working on a file
(3) Use Alt+Tab to switch back and forth between Chrome and VS Code a few times
(4) Try using VS Code

Expected: VS Code behaves normally
Actual: VS Code acts as though a key is held down, usually Alt or an arrow key

This also affected Tilix, which at one point acted as though the Enter key was held down.
 
can you reproduce this with /usr/lib/weston/weston-eventdemo ?
 Issue 820638  has been merged into this issue.
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 17 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c98d55f133677d5281011be711833a488825ff5f

commit c98d55f133677d5281011be711833a488825ff5f
Author: David Reveman <reveman@chromium.org>
Date: Sat Mar 17 21:22:51 2018

exo: Fix incorrect repeat of keyboard events.

We should not be generating keyboard press events when a key is
already pressed.

Fix this issue by restoring the "pressed keys" set in the
Keyboard class. Seat is still tracking pressed keys in order
to ensure that accelerator key presses are not lost.

Bug:  820641 
Test: exo_unittests --gtest_filter=KeyboardTest.OnKeyboardKey
Change-Id: I56c7110361c0894f3fd8d882c45c1d2bfe3d634f
Reviewed-on: https://chromium-review.googlesource.com/967727
Commit-Queue: David Reveman <reveman@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543949}
[modify] https://crrev.com/c98d55f133677d5281011be711833a488825ff5f/components/exo/keyboard.cc
[modify] https://crrev.com/c98d55f133677d5281011be711833a488825ff5f/components/exo/keyboard.h
[modify] https://crrev.com/c98d55f133677d5281011be711833a488825ff5f/components/exo/keyboard_unittest.cc

Labels: Merge-Request-66 M-66
Owner: reve...@chromium.org
Status: Assigned (was: Untriaged)
This fix is critical for Crostini. The fix is relatively safe and the code is only used on ChromeOS with ARC++ and Crostini.
Project Member

Comment 5 by sheriffbot@chromium.org, Mar 18 2018

Labels: -Merge-Request-66 Merge-Review-66 Hotlist-Merge-Review
This bug requires manual review: M66 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Merge-Review-66 Merge-Approved-66
Project Member

Comment 7 by bugdroid1@chromium.org, Mar 19 2018

Labels: -merge-approved-66 merge-merged-3359
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a5354c9e739241f84442d4565b9bdfa9c5c20af0

commit a5354c9e739241f84442d4565b9bdfa9c5c20af0
Author: David Reveman <reveman@chromium.org>
Date: Mon Mar 19 19:29:11 2018

exo: Fix incorrect repeat of keyboard events.

We should not be generating keyboard press events when a key is
already pressed.

Fix this issue by restoring the "pressed keys" set in the
Keyboard class. Seat is still tracking pressed keys in order
to ensure that accelerator key presses are not lost.

TBR=reveman@chromium.org

(cherry picked from commit c98d55f133677d5281011be711833a488825ff5f)

Bug:  820641 
Test: exo_unittests --gtest_filter=KeyboardTest.OnKeyboardKey
Change-Id: I56c7110361c0894f3fd8d882c45c1d2bfe3d634f
Reviewed-on: https://chromium-review.googlesource.com/967727
Commit-Queue: David Reveman <reveman@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#543949}
Reviewed-on: https://chromium-review.googlesource.com/969442
Reviewed-by: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/branch-heads/3359@{#321}
Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276}
[modify] https://crrev.com/a5354c9e739241f84442d4565b9bdfa9c5c20af0/components/exo/keyboard.cc
[modify] https://crrev.com/a5354c9e739241f84442d4565b9bdfa9c5c20af0/components/exo/keyboard.h
[modify] https://crrev.com/a5354c9e739241f84442d4565b9bdfa9c5c20af0/components/exo/keyboard_unittest.cc

Status: Fixed (was: Assigned)
Project Member

Comment 9 by bugdroid1@chromium.org, Apr 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cac2a4ebea9321b4d6e2763fd5ce699546372c02

commit cac2a4ebea9321b4d6e2763fd5ce699546372c02
Author: David Reveman <reveman@chromium.org>
Date: Tue Apr 10 01:24:07 2018

exo: Fix keyboard pressed key tracking.

Use a top priority pre-target handler in Seat class to track
pressed keys. This is needed to ensure that we see all key events.

Also cleanup some of the code in Keyboard class where we send
modifiers. It doesn't make sense to send modifiers in cases
where the key event is a reserved accelerator and won't be
delivered to the client.

Bug:  820641 
Test: exo_unittests --gtest_filter=KeyboardTest.OnKeyboardEnter
Change-Id: Ib1169a7c0ad70e8e7973c94edf4b9885fecc7819
Reviewed-on: https://chromium-review.googlesource.com/1001634
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Commit-Queue: Daniele Castagna <dcastagna@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549364}
[modify] https://crrev.com/cac2a4ebea9321b4d6e2763fd5ce699546372c02/components/exo/keyboard.cc
[modify] https://crrev.com/cac2a4ebea9321b4d6e2763fd5ce699546372c02/components/exo/keyboard_unittest.cc
[modify] https://crrev.com/cac2a4ebea9321b4d6e2763fd5ce699546372c02/components/exo/seat.cc
[modify] https://crrev.com/cac2a4ebea9321b4d6e2763fd5ce699546372c02/components/exo/wm_helper.cc

Project Member

Comment 10 by bugdroid1@chromium.org, May 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e8969644347f9c9a05789480a1c7a06c525529d3

commit e8969644347f9c9a05789480a1c7a06c525529d3
Author: David Reveman <reveman@chromium.org>
Date: Wed May 02 15:10:10 2018

exo: Improve keyboard pressed key tracking.

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/1038907
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Commit-Queue: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555389}
[modify] https://crrev.com/e8969644347f9c9a05789480a1c7a06c525529d3/components/exo/keyboard.cc
[modify] https://crrev.com/e8969644347f9c9a05789480a1c7a06c525529d3/components/exo/keyboard_unittest.cc

Project Member

Comment 11 by bugdroid1@chromium.org, May 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/a660b1bc527854bec8567001b44ae53a5881bfad

commit a660b1bc527854bec8567001b44ae53a5881bfad
Author: David Reveman <reveman@chromium.org>
Date: Fri May 04 07:13:43 2018

vm_tools: fix handling of accelerator keys.

We need to track pressed keys and make sure that key release
events are forwarded properly when if pressed.

We use the same pattern as chrome, which is:
- Send key press events if they should be handled and are not
  already pressed.
- Send key release events if they are currently pressed.

BUG= chromium:820641 
TEST=keys are released properly when using profile switching shortcuts

Change-Id: I3356c4aa6d40de33d655a90f23cc4005ecb2a9b5
Reviewed-on: https://chromium-review.googlesource.com/1038825
Commit-Ready: David Reveman <reveman@chromium.org>
Tested-by: David Reveman <reveman@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>

[modify] https://crrev.com/a660b1bc527854bec8567001b44ae53a5881bfad/vm_tools/sommelier/sommelier.c

Sign in to add a comment