Commit 20abff2d authored by David Tseng's avatar David Tseng Committed by Commit Bot

Misc ChromeVox key map cleanup

Change-Id: I49c121270a55d94a7142ee4a7a085dae6d9c82c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2064768
Commit-Queue: David Tseng <dtseng@chromium.org>
Reviewed-by: default avatarAkihiro Ota <akihiroota@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743342}
parent f59fc628
...@@ -28,7 +28,7 @@ BackgroundKeyboardHandler = class { ...@@ -28,7 +28,7 @@ BackgroundKeyboardHandler = class {
chrome.accessibilityPrivate.setKeyboardListener( chrome.accessibilityPrivate.setKeyboardListener(
true, ChromeVox.isStickyPrefOn); true, ChromeVox.isStickyPrefOn);
window['prefs'].switchToKeyMap('keymap_next'); window['prefs'].switchToKeyMap('keymap_default');
} }
/** /**
......
...@@ -265,16 +265,7 @@ KeyMap = class { ...@@ -265,16 +265,7 @@ KeyMap = class {
*/ */
static fromDefaults() { static fromDefaults() {
return /** @type {!KeyMap} */ (KeyMap.fromPath( return /** @type {!KeyMap} */ (KeyMap.fromPath(
KeyMap.KEYMAP_PATH + KeyMap.AVAILABLE_MAP_INFO['keymap_next'].file)); KeyMap.KEYMAP_PATH + KeyMap.AVAILABLE_MAP_INFO['keymap_default'].file));
}
/**
* Convenience method for getting a ChromeVox Next key map.
* @return {KeyMap} The Next key map.
*/
static fromNext() {
return KeyMap.fromPath(
KeyMap.KEYMAP_PATH + KeyMap.AVAILABLE_MAP_INFO['keymap_next'].file);
} }
/** /**
...@@ -416,7 +407,7 @@ KeyMap.KEYMAP_PATH = 'background/keymaps/'; ...@@ -416,7 +407,7 @@ KeyMap.KEYMAP_PATH = 'background/keymaps/';
* @const * @const
*/ */
KeyMap.AVAILABLE_MAP_INFO = { KeyMap.AVAILABLE_MAP_INFO = {
'keymap_next': {'file': 'default_keymap.json'} 'keymap_default': {'file': 'default_keymap.json'}
}; };
......
...@@ -47,7 +47,7 @@ KbExplorer = class { ...@@ -47,7 +47,7 @@ KbExplorer = class {
window.backgroundWindow['BrailleCommandHandler']['setEnabled'](false); window.backgroundWindow['BrailleCommandHandler']['setEnabled'](false);
window.backgroundWindow['GestureCommandHandler']['setEnabled'](false); window.backgroundWindow['GestureCommandHandler']['setEnabled'](false);
ChromeVoxKbHandler.handlerKeyMap = KeyMap.fromNext(); ChromeVoxKbHandler.handlerKeyMap = KeyMap.fromDefaults();
/** @type {LibLouis.Translator} */ /** @type {LibLouis.Translator} */
KbExplorer.currentBrailleTranslator_ = KbExplorer.currentBrailleTranslator_ =
......
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