Commit a4cf67d2 authored by Mathew King's avatar Mathew King Committed by Commit Bot

xkb: Fallback to DOM|code|->keyboard code mapping

If XkbLookup fails and there is no DOM|code|->DOM|key| mapping. This
will happen in cases where a DOM|code| exists without a W3C standard
DOM|key|.

BUG=952051
TBR=wez

Change-Id: I63af869118e15c99bcb7cd4cbcb3e58def610334
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2008049Reviewed-by: default avatarJesse Schettler <jschettler@chromium.org>
Commit-Queue: Jesse Schettler <jschettler@chromium.org>
Auto-Submit: Mathew King <mathewk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732934}
parent 2651bcd9
...@@ -747,7 +747,13 @@ bool XkbKeyboardLayoutEngine::Lookup(DomCode dom_code, ...@@ -747,7 +747,13 @@ bool XkbKeyboardLayoutEngine::Lookup(DomCode dom_code,
// If we do not have matching legacy Xkb keycode for the Dom code, // If we do not have matching legacy Xkb keycode for the Dom code,
// we could be dealing with a newer application launcher or similar // we could be dealing with a newer application launcher or similar
// key. Let's see if we have a basic mapping for it. // key. Let's see if we have a basic mapping for it.
return DomCodeToNonPrintableDomKey(dom_code, dom_key, key_code); if (!DomCodeToNonPrintableDomKey(dom_code, dom_key, key_code)) {
// If no Dom Key was found see if there is a matching Dom Code to keycode
// mapping for it.
*dom_key = DomKey::UNIDENTIFIED;
*key_code = DomCodeToUsLayoutNonLocatedKeyboardCode(dom_code);
}
return true;
} }
// Classify the keysym and convert to DOM and VKEY representations. // Classify the keysym and convert to DOM and VKEY representations.
......
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