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

Issue 834594 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 10
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug-Regression



Sign in to add a comment

caps lock mapping is lost upon new keyboard connection (escape is not)

Project Member Reported by semenzato@chromium.org, Apr 19 2018

Issue description

https://listnr.corp.google.com/product/208/reports?searchText=reportId:85333222216

From the report:

In Settings, I mapped Caps Lock -> ESC and ESC->Launcher. This works
for built-in keyboard on my Pixelbook. However, I attached plugged in
a Microsoft Sculpt Ergonomic keyboard via USB, and this doesn't
respect the re-mapping. When I hit Caps Lock, caps lock turns on.
However, when I hit ESC on my MS keyboard, I do still get the
launcher.

The user then corrected:

In fact, the caps lock setting just resets when I plug in a new keyboard. I was able to go back into settings and update the caps lock mapping for my external keyboard and it worked. For some reason, the Escape mapping persists between keyboards but the caps lock one doesn't.

 
Happens to me too with virtual keyboard when I flip my Samsung Chromebook Plus to tablet mode.  The onscreen keyboard doesn't recognize caps locking and generates a text error stating it isn't mapped.   Unidentified is the word it enters into any text field you are typing in when tapping the locks key on any screen.  
Owner: weidongg@chromium.org
Status: Assigned (was: Untriaged)
please take a look.
seems like pixelbook keyboard settings in chrome:settings lost caps lock configuration even when external keyboard is plugged in. It used to not be the case.


 

tested on today's canary but has been like this for a while
70.0.3538.0 
When there's no external keyboard, caps lock key does not exist, so the mapping does not show up in keyboard settings (I think it is WAI). When external keyboard is connected, the mapping will show up.
@weidongg - this makes sense. But, virtually no external keyboards have a "search" key like the one on the Chrome OS keyboard, so it seems it would make sense to treat caps lock and search mappings the same way across external/built-in keyboards.
Cc: afakhry@chromium.org
afakhry@, "caps lock shows up in settings if external keyboard is connected" is added here [1], is this WAI?

[1] https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.cc?l=130
Search is equivalent to the "Win" key on external keyboards. The option to remap the caps lock will only show up when you connect an external keyboard, so this is  WAI.

However, if for some reason, disconnecting and reconnecting the same keyboard makes you lose the caps lock mapping, then this is a bug. I don't think I've seen this before, mappings should persist. Please verify.
Cc: uekawa@chromium.org
hmm..  
caps lock setting does not appear even when I connect/disconnect external keyboard.

sent feedback .

listnr/report/85640929989
That's weird. I can't repro this issue! What type of keyboard is this? 

uekawa@ if you can help us debug this, that would be great! What are the keyboards enumerated here: https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.cc?type=cs&q=%22showCapsLock%22&g=0&l=31 ?
2018-09-05.png
136 KB View Download
same keyboard on 69.0.3480.0 on kevin adds caps lock on settings page.
This is realforce 87B SE170S https://www.amazon.co.jp/gp/product/B00542RTIU/

I will update to latest canary on kevin to see if that repros there.

... repro on kevin with 70.0.3538.0
now to add debug messages.
[13817:13817:0906/133150.621041:ERROR:event_rewriter_chromeos.cc(291)] Device name: Topre Corporation Realforce 87
[13817:13817:0906/133150.621066:ERROR:device_keyboard_handler.cc(33)] keyboard type is 0
https://chromium-review.googlesource.com/c/chromium/src/+/1074336
changes behavior, before devices were Unknown, but now keyboards with device name containing "keyboard" is handled specially and Unknown is not handled as an external keyboard.

 
Labels: -Type-Bug M-70 Type-Bug-Regression
Owner: afakhry@chromium.org
Labels: -Pri-2 Pri-1
Labels: ReleaseBlock-Beta
Status: Started (was: Assigned)
Labels: Merge-Request-70
CL https://chromium-review.googlesource.com/c/chromium/src/+/1214322 landed at: 071f7d07df0dcf7d16bbb78bd31c9d8e8b096849

Requesting merge to M-70
Project Member

Comment 21 by sheriffbot@chromium.org, Sep 9

Labels: -Merge-Request-70 Hotlist-Merge-Approved Merge-Approved-70
Your change meets the bar and is auto-approved for M70. Please go ahead and merge the CL to branch 3538 manually. Please contact milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), geohsu@(ChromeOS), abdulsyed@(Desktop)

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

Comment 22 by bugdroid1@chromium.org, Sep 10

Labels: -merge-approved-70 merge-merged-3538
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8b21d607d5eace43d2b3ed6ecc618a4891fd14e4

commit 8b21d607d5eace43d2b3ed6ecc618a4891fd14e4
Author: Ahmed Fakhry <afakhry@google.com>
Date: Mon Sep 10 20:37:01 2018

[Merge to M-70] Fix wrong assumption about external keyboard names

The code used to assume that a keyboard device name
must include the string "keyboard" in it.
CL at crrev.com/c/1074336 built on this wrong assumption
to detect whether to show external keyboard key remap
settings in the system keyboard settings.

This CL fixes this assumption.

TBR=kpschoedel@chromium.org, stevenjb@chromium.org
BUG= 834594 
TEST=manually, unit test.

(cherry picked from commit 071f7d07df0dcf7d16bbb78bd31c9d8e8b096849)

Change-Id: I174173097e6da0159c655f724690060ebe74529a
Reviewed-on: https://chromium-review.googlesource.com/1214322
Reviewed-by: Kevin Schoedel <kpschoedel@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Ahmed Fakhry <afakhry@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#589722}
Reviewed-on: https://chromium-review.googlesource.com/1217543
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/branch-heads/3538@{#247}
Cr-Branched-From: 79f7c91a2b2a2932cd447fa6f865cb6662fa8fa6-refs/heads/master@{#587811}
[modify] https://crrev.com/8b21d607d5eace43d2b3ed6ecc618a4891fd14e4/chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler.cc
[modify] https://crrev.com/8b21d607d5eace43d2b3ed6ecc618a4891fd14e4/chrome/browser/ui/webui/settings/chromeos/device_keyboard_handler_unittest.cc
[modify] https://crrev.com/8b21d607d5eace43d2b3ed6ecc618a4891fd14e4/ui/chromeos/events/event_rewriter_chromeos.cc
[modify] https://crrev.com/8b21d607d5eace43d2b3ed6ecc618a4891fd14e4/ui/chromeos/events/event_rewriter_chromeos.h

Status: Fixed (was: Started)

Sign in to add a comment