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

Issue 8356040: Reapply Caps Lock and Num Lock to core keyboard whenever new X input device is added (Closed)

Created:
9 years, 2 months ago by Yusuke Sato
Modified:
9 years, 1 month ago
CC:
chromium-reviews, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Reapply Caps Lock and Num Lock to core keyboard whenever new X input device is added. - Let Chrome maintain Num Lock & Caps Lock state. Monitor the X device hierarchy, and, upon detecting any newly attached keyboards, reapply the current Num Lock and Caps Lock state to the master/core keyboard, which will then propagate down to all slaves (including the newly attached one). - Similarly, whenever Chrome detects a Num Lock and/or Caps Lock state change originating from the server, it parrots the change back down to X. This fixes the XKB asymmetric indicator state propagation. See also: http://crosbug.com/p/6245#c18 BUG=chromium-os:22562 BUG=crosbug.com/p/5795 BUG=crosbug.com/p/6245 TEST=On Mario and Alex, connect a USB hub, and connect two keyboards, say A and B, to the hub. Press NumLock on A, confirm that the NumLock LED on B also changes. Do the same for CapsLock. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=108841

Patch Set 1 #

Patch Set 2 : code review #

Patch Set 3 : fix unit_tests #

Total comments: 6

Patch Set 4 : review fix #

Patch Set 5 : XI2 fix #

Patch Set 6 : move chrome_browser_main_chromeos.cc to an another CL #

Unified diffs Side-by-side diffs Delta from patch set Stats (+340 lines, -76 lines) Patch
M chrome/browser/chromeos/input_method/input_method_manager.h View 1 1 chunk +0 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/input_method/xkeyboard.h View 1 2 3 4 chunks +56 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/input_method/xkeyboard.cc View 1 2 3 4 chunks +121 lines, -6 lines 0 comments Download
M chrome/browser/chromeos/input_method/xkeyboard_unittest.cc View 1 2 3 4 chunks +114 lines, -43 lines 0 comments Download
M chrome/browser/chromeos/system_key_event_listener.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/system_key_event_listener.cc View 1 2 3 5 chunks +34 lines, -9 lines 0 comments Download
M chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.cc View 1 2 3 4 1 chunk +10 lines, -5 lines 0 comments Download
M chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc View 1 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Yusuke Sato
9 years, 2 months ago (2011-10-20 10:44:57 UTC) #1
Zachary Kuznia
lgtm
9 years, 2 months ago (2011-10-21 04:15:31 UTC) #2
Yusuke Sato
djkurtz: Fixed the CL following your (offline) suggestion. Please take another look.
9 years, 1 month ago (2011-11-04 09:36:14 UTC) #3
Daniel Kurtz
Looks really good! Just some potential optimizations to think about... http://codereview.chromium.org/8356040/diff/6001/chrome/browser/chromeos/input_method/xkeyboard.cc File chrome/browser/chromeos/input_method/xkeyboard.cc (right): http://codereview.chromium.org/8356040/diff/6001/chrome/browser/chromeos/input_method/xkeyboard.cc#newcode437 ...
9 years, 1 month ago (2011-11-04 11:49:18 UTC) #4
Yusuke Sato
http://codereview.chromium.org/8356040/diff/6001/chrome/browser/chromeos/input_method/xkeyboard.cc File chrome/browser/chromeos/input_method/xkeyboard.cc (right): http://codereview.chromium.org/8356040/diff/6001/chrome/browser/chromeos/input_method/xkeyboard.cc#newcode437 chrome/browser/chromeos/input_method/xkeyboard.cc:437: SetCapsLockEnabled(current_caps_lock_status_); On 2011/11/04 11:49:18, Daniel Kurtz wrote: > Save ...
9 years, 1 month ago (2011-11-07 04:31:28 UTC) #5
Yusuke Sato
Correction: if (!(event->flags & XISlaveAdded)) return; for (int i = 0; i < event->num_info; ++i) ...
9 years, 1 month ago (2011-11-07 05:06:44 UTC) #6
Daniel Kurtz
LGTM. It is unfortunate that X doesn't seem to be sending Attached events for SlaveKeyboards. ...
9 years, 1 month ago (2011-11-07 06:30:01 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yusukes@chromium.org/8356040/18001
9 years, 1 month ago (2011-11-07 07:13:26 UTC) #8
commit-bot: I haz the power
9 years, 1 month ago (2011-11-07 08:55:52 UTC) #9
Change committed as 108841

Powered by Google App Engine
This is Rietveld 408576698