Add keyboard navigation options for the main browser windows. Fixes #2895

This commit is contained in:
Khushboo Vashi
2018-02-02 14:28:37 +01:00
committed by Dave Page
parent 2042f89ce0
commit 262d01bf01
16 changed files with 438 additions and 12 deletions

View File

@@ -8,7 +8,8 @@ const EDIT_KEY = 71, // Key: G -> Grid values
F7_KEY = 118,
F8_KEY = 119,
PERIOD_KEY = 190,
FWD_SLASH_KEY = 191;
FWD_SLASH_KEY = 191,
ESC_KEY = 27;
function isMac() {
return window.navigator.platform.search('Mac') != -1;
@@ -158,6 +159,8 @@ function keyboardShortcutsQueryTool(sqlEditorController, queryToolActions, event
panel_id = this.getInnerPanel(
sqlEditorController.container, 'right'
);
} else if (keyCode == ESC_KEY) {
queryToolActions.focusOut(sqlEditorController);
}
return panel_id;
}