Index: chrome/browser/resources/keyboard/main.js |
diff --git a/chrome/browser/resources/keyboard/main.js b/chrome/browser/resources/keyboard/main.js |
index 4560e9fed3511eab3addbe3fc4e19719cb1cda0c..1f7e5d5b9903a37d8db2771534a0b6590a699f62 100644 |
--- a/chrome/browser/resources/keyboard/main.js |
+++ b/chrome/browser/resources/keyboard/main.js |
@@ -559,7 +559,7 @@ var KEYS = [ |
// TODO(bryeung): the spacebar needs to be a little bit more stretchy, |
// since this row has only 7 keys (as opposed to 12), the truncation |
// can cause it to not be wide enough. |
- new SpecialKey(4.8, ' ', 'Spacebar'), |
+ new SpecialKey(4.8, 'US', 'Spacebar'), |
new SpecialKey(1.3, ',', ','), |
new SpecialKey(1.3, '.', '.'), |
new HideKeyboardKey() |
@@ -698,3 +698,15 @@ window.onload = function() { |
} |
// TODO(bryeung): would be nice to leave less gutter (without causing |
// rendering issues with floated divs wrapping at some sizes). |
+ |
+/** |
+ * Switch the keyboard layout e.g. to US-Dvorak. |
+ * @return {void} |
+ */ |
+window.onhashchange = function() { |
+ var layout = location.hash.replace(/^#/, "").toUpperCase(); |
+ MODES.forEach(function(e) { |
+ allRows[3].keys_[3].modeElements_[e].textContent = layout; |
+ }); |
+ // TODO(mazda): Switch the keyboard layout using the layout value. |
+} |