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

Unified Diff: ui/keyboard/resources/elements/kb-key-sequence.html

Issue 26258003: Add a full QWERTY layout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix edge case in WebUI Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/keyboard/resources/elements/kb-key-sequence.html
diff --git a/ui/keyboard/resources/elements/kb-key-sequence.html b/ui/keyboard/resources/elements/kb-key-sequence.html
index ad01003b2a1abf4d7e7dea5c516b5c48370e63b7..fef90fd7ed1041becb8a9f9d69ca172889df3014 100644
--- a/ui/keyboard/resources/elements/kb-key-sequence.html
+++ b/ui/keyboard/resources/elements/kb-key-sequence.html
@@ -4,7 +4,8 @@
-- found in the LICENSE file.
-->
-<polymer-element name="kb-key-sequence" attributes="keys hintTexts keyCodes">
+<polymer-element name="kb-key-sequence"
+ attributes="keys hintTexts keyCodes invert">
<template>
<style>
@host {
@@ -41,8 +42,15 @@
key.accents = newKeys[i];
if (newHintTexts)
key.hintText = newHintTexts[i];
+ var keyCodeIndex = keyCodes[i];
+
+ if (this.invert) {
+ key.invert = true;
+ key.char = newKeys[i];
+ keyCodeIndex = key.hintText;
+ }
var state = this.$.keyCodeMetadata.GetKeyCodeAndModifiers(
- keyCodes[i]);
+ keyCodeIndex);
if (state) {
key.keyCode = state.keyCode;
key.shiftModifier = state.shiftModifier;

Powered by Google App Engine
This is Rietveld 408576698