Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Issue 336403005: Use XInput2 events for keyboard events. (Closed)

Created:
6 years, 6 months ago by kpschoedel
Modified:
6 years, 5 months ago
Reviewers:
sadrul, Daniel Erat
CC:
chromium-reviews, sadrul, nkostylev+watch_chromium.org, tdresser+watch_chromium.org, oshima+watch_chromium.org, kalyank, ben+aura_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Use XInput2 events for keyboard events. Patch set 1: Use XInput2 events for keyboard events. XI2 keyboard events are generated, rewritten to core events, and consumed. EventRewriter tests pass with XI2 key events. Patch set 2: Move source_device_id_ up to |ui::Event|. Patch set 3: EventRewriter is no longer a PlatformEventObserver or DeviceHierarchyObserver. |chromeos::EventRewriter| now uses |ui::KeyEvent::source_device_id()| instead of tracking XI2 key events itself as a chromeos::DeviceHierarchyObserver and |ui::PlatformEventObserver|. Patch set 4: Convert Alt + Left Button rewriter from XI2 events to|ui::Event|s. BUG=368750 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282717

Patch Set 1 : Use XInput2 events for keyboard events. #

Patch Set 2 : Move source_device_id_ up to |ui::Event|. #

Patch Set 3 : EventRewriter no longer a PlatformEventObserver or DeviceHierarchyObserver. #

Patch Set 4 : Convert Alt + Left Button rewriter from XI2 events to |ui::Event|s. #

Patch Set 5 : Add TODO regarding XI2-to-core rewriting. #

Total comments: 23

Patch Set 6 : Address review comments (derat). #

Total comments: 4

Patch Set 7 : Address review comments (derat), the sequel. #

Total comments: 15

Patch Set 8 : Address review comments (sadrul). #

Patch Set 9 : Address review comments (sadrul), part 2. #

Patch Set 10 : rebase #

Patch Set 11 : fix existing use of set_source_device_id() #

Patch Set 12 : rebase #

Patch Set 13 : Post rebase, make KeyboardCodeFromXKeyEvent() not modify its argument. #

Total comments: 10

Patch Set 14 : Address review comments (sadrul) 3 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+671 lines, -330 lines) Patch
M chrome/browser/chromeos/events/event_rewriter.h View 1 2 3 4 5 6 chunks +28 lines, -38 lines 0 comments Download
M chrome/browser/chromeos/events/event_rewriter.cc View 1 2 3 4 5 6 7 17 chunks +115 lines, -111 lines 0 comments Download
M chrome/browser/chromeos/events/event_rewriter_unittest.cc View 1 2 3 4 5 6 7 50 chunks +296 lines, -93 lines 0 comments Download
M chrome/browser/chromeos/events/keyboard_driven_event_rewriter.cc View 1 2 3 4 5 2 chunks +6 lines, -3 lines 0 comments Download
M ui/aura/gestures/gesture_recognizer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -2 lines 0 comments Download
M ui/aura/window_tree_host_x11.cc View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -3 lines 0 comments Download
M ui/events/event.h View 1 2 3 4 5 6 7 8 9 6 chunks +8 lines, -9 lines 0 comments Download
M ui/events/event.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +21 lines, -15 lines 0 comments Download
M ui/events/event_constants.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M ui/events/keycodes/keyboard_code_conversion_x.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -3 lines 0 comments Download
M ui/events/keycodes/keyboard_code_conversion_x.cc View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +72 lines, -21 lines 0 comments Download
M ui/events/test/events_test_utils.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ui/events/test/events_test_utils_x11.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M ui/events/test/events_test_utils_x11.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +27 lines, -0 lines 0 comments Download
M ui/events/x/events_x.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 7 chunks +66 lines, -32 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
kpschoedel
6 years, 6 months ago (2014-06-25 14:43:52 UTC) #1
Daniel Erat
this generally lgtm with some comments https://codereview.chromium.org/336403005/diff/80001/chrome/browser/chromeos/events/event_rewriter.cc File chrome/browser/chromeos/events/event_rewriter.cc (right): https://codereview.chromium.org/336403005/diff/80001/chrome/browser/chromeos/events/event_rewriter.cc#newcode253 chrome/browser/chromeos/events/event_rewriter.cc:253: ui::KeyEvent* rewritten_key_event = ...
6 years, 6 months ago (2014-06-25 17:13:25 UTC) #2
kpschoedel
https://codereview.chromium.org/336403005/diff/80001/chrome/browser/chromeos/events/event_rewriter.cc File chrome/browser/chromeos/events/event_rewriter.cc (right): https://codereview.chromium.org/336403005/diff/80001/chrome/browser/chromeos/events/event_rewriter.cc#newcode253 chrome/browser/chromeos/events/event_rewriter.cc:253: ui::KeyEvent* rewritten_key_event = 0; On 2014/06/25 17:13:24, Daniel Erat ...
6 years, 6 months ago (2014-06-25 19:59:49 UTC) #3
Daniel Erat
lgtm https://codereview.chromium.org/336403005/diff/80001/chrome/browser/chromeos/events/event_rewriter.h File chrome/browser/chromeos/events/event_rewriter.h (right): https://codereview.chromium.org/336403005/diff/80001/chrome/browser/chromeos/events/event_rewriter.h#newcode84 chrome/browser/chromeos/events/event_rewriter.h:84: static void RewrittenKeyEvent(const ui::KeyEvent& key_event, On 2014/06/25 19:59:48, ...
6 years, 6 months ago (2014-06-25 20:06:13 UTC) #4
kpschoedel
https://codereview.chromium.org/336403005/diff/100001/chrome/browser/chromeos/events/event_rewriter.cc File chrome/browser/chromeos/events/event_rewriter.cc (right): https://codereview.chromium.org/336403005/diff/100001/chrome/browser/chromeos/events/event_rewriter.cc#newcode254 chrome/browser/chromeos/events/event_rewriter.cc:254: ui::KeyEvent* rewritten_key_event = 0; On 2014/06/25 20:06:13, Daniel Erat ...
6 years, 6 months ago (2014-06-25 21:10:40 UTC) #5
sadrul
https://codereview.chromium.org/336403005/diff/120001/chrome/browser/chromeos/events/event_rewriter.cc File chrome/browser/chromeos/events/event_rewriter.cc (right): https://codereview.chromium.org/336403005/diff/120001/chrome/browser/chromeos/events/event_rewriter.cc#newcode166 chrome/browser/chromeos/events/event_rewriter.cc:166: #endif change this line to: #endif // defined(USE_X11) https://codereview.chromium.org/336403005/diff/120001/ui/aura/window_tree_host_x11.cc ...
6 years, 6 months ago (2014-06-26 12:34:20 UTC) #6
kpschoedel
https://codereview.chromium.org/336403005/diff/120001/chrome/browser/chromeos/events/event_rewriter.cc File chrome/browser/chromeos/events/event_rewriter.cc (right): https://codereview.chromium.org/336403005/diff/120001/chrome/browser/chromeos/events/event_rewriter.cc#newcode166 chrome/browser/chromeos/events/event_rewriter.cc:166: #endif On 2014/06/26 12:34:19, sadrul wrote: > change this ...
6 years, 6 months ago (2014-06-26 17:24:10 UTC) #7
sadrul
https://codereview.chromium.org/336403005/diff/120001/ui/aura/window_tree_host_x11.cc File ui/aura/window_tree_host_x11.cc (right): https://codereview.chromium.org/336403005/diff/120001/ui/aura/window_tree_host_x11.cc#newcode379 ui/aura/window_tree_host_x11.cc:379: if (base::SysInfo::IsRunningOnChromeOS()) On 2014/06/26 17:24:10, kpschoedel wrote: > On ...
6 years, 6 months ago (2014-06-26 17:28:07 UTC) #8
kpschoedel
https://codereview.chromium.org/336403005/diff/120001/ui/aura/window_tree_host_x11.cc File ui/aura/window_tree_host_x11.cc (right): https://codereview.chromium.org/336403005/diff/120001/ui/aura/window_tree_host_x11.cc#newcode379 ui/aura/window_tree_host_x11.cc:379: if (base::SysInfo::IsRunningOnChromeOS()) On 2014/06/26 17:28:07, sadrul wrote: > We ...
6 years, 6 months ago (2014-06-26 19:10:59 UTC) #9
kpschoedel
https://codereview.chromium.org/336403005/diff/120001/ui/aura/window_tree_host_x11.cc File ui/aura/window_tree_host_x11.cc (right): https://codereview.chromium.org/336403005/diff/120001/ui/aura/window_tree_host_x11.cc#newcode379 ui/aura/window_tree_host_x11.cc:379: if (base::SysInfo::IsRunningOnChromeOS()) Never mind, got it now.
6 years, 6 months ago (2014-06-26 21:50:40 UTC) #10
sadrul
https://codereview.chromium.org/336403005/diff/320001/ui/events/keycodes/keyboard_code_conversion_x.h File ui/events/keycodes/keyboard_code_conversion_x.h (right): https://codereview.chromium.org/336403005/diff/320001/ui/events/keycodes/keyboard_code_conversion_x.h#newcode34 ui/events/keycodes/keyboard_code_conversion_x.h:34: void InitXKeyEventFromXIDeviceEvent(const XEvent& src, XEvent* dst); You likely need ...
6 years, 5 months ago (2014-07-10 16:03:06 UTC) #11
kpschoedel
https://codereview.chromium.org/336403005/diff/320001/ui/events/keycodes/keyboard_code_conversion_x.h File ui/events/keycodes/keyboard_code_conversion_x.h (right): https://codereview.chromium.org/336403005/diff/320001/ui/events/keycodes/keyboard_code_conversion_x.h#newcode34 ui/events/keycodes/keyboard_code_conversion_x.h:34: void InitXKeyEventFromXIDeviceEvent(const XEvent& src, XEvent* dst); On 2014/07/10 16:03:06, ...
6 years, 5 months ago (2014-07-10 17:22:40 UTC) #12
sadrul
LGTM
6 years, 5 months ago (2014-07-11 18:26:01 UTC) #13
kpschoedel
The CQ bit was checked by kpschoedel@chromium.org
6 years, 5 months ago (2014-07-11 18:57:06 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kpschoedel@chromium.org/336403005/340001
6 years, 5 months ago (2014-07-11 18:58:21 UTC) #15
commit-bot: I haz the power
6 years, 5 months ago (2014-07-11 22:25:16 UTC) #16
Message was sent while issue was closed.
Change committed as 282717

Powered by Google App Engine
This is Rietveld 408576698