Commit da2a6952 authored by Josiah K's avatar Josiah K Committed by Chromium LUCI CQ

[Switch Access] Render Space key as 'Space' instead of ' '

Screenshot: https://screenshot.googleplex.com/4miZFhDoWjqF5j6

Fixed: 1158097
AX-Relnotes: N/A.
Change-Id: I13e25d67528f66df200bddae6b90daf1dd424b9b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2588032Reviewed-by: default avatarDavid Tseng <dtseng@chromium.org>
Reviewed-by: default avatarJimmy Gong <jimmyxgong@chromium.org>
Commit-Queue: Jimmy Gong <jimmyxgong@chromium.org>
Auto-Submit: Josiah Krutz <josiahk@google.com>
Cr-Commit-Position: refs/heads/master@{#837299}
parent 04ed067a
......@@ -9,9 +9,11 @@
#include "base/bind.h"
#include "base/no_destructor.h"
#include "base/values.h"
#include "chrome/grit/generated_resources.h"
#include "components/prefs/pref_service.h"
#include "content/public/browser/web_contents.h"
#include "ui/aura/window.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/events/event.h"
#include "ui/events/event_constants.h"
#include "ui/events/keycodes/dom/dom_code.h"
......@@ -41,6 +43,10 @@ std::string GetStringForKeyboardCode(ui::KeyboardCode key_code) {
dom_key.IsDeadKey()) {
continue;
}
// Make sure the space key is rendered as "Space" instead of " ".
if (key_code == ui::VKEY_SPACE) {
return l10n_util::GetStringUTF8(IDS_SETTINGS_SWITCH_ASSIGN_OPTION_SPACE);
}
return ui::KeycodeConverter::DomKeyToKeyString(dom_key);
}
return std::string();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment