diff --git a/docs/en_US/keyboard_shortcuts.rst b/docs/en_US/keyboard_shortcuts.rst index c82287a22..8697e99ce 100644 --- a/docs/en_US/keyboard_shortcuts.rst +++ b/docs/en_US/keyboard_shortcuts.rst @@ -4,6 +4,7 @@ Keyboard Shortcuts Keyboard shortcuts are provided in pgAdmin to allow easy access to specific functions. + **Desktop Runtime** When running in the Desktop Runtime, the following keyboard shortcuts are available: @@ -26,6 +27,7 @@ When running in the Desktop Runtime, the following keyboard shortcuts are availa | Ctrl+0 | Cmd+0 | Reset the zoom level | +--------------------------+----------------+---------------------------------------+ + **SQL Editors** When using the syntax-highlighting SQL editors, the following shortcuts are available: @@ -61,6 +63,9 @@ When using the syntax-highlighting SQL editors, the following shortcuts are avai +--------------------------+------------------+-------------------------------------+ | Shift+Tab | Shift+Tab | Un-indent selected text | +--------------------------+------------------+-------------------------------------+ +| + y | + y | Copy SQL on history panel | ++--------------------------+------------------+-------------------------------------+ + **Query Tool** @@ -89,35 +94,49 @@ When using the Query Tool, the following shortcuts are available: +--------------------------+--------------------+-----------------------------------+ | Ctrl+Shift+F | Cmd+Shift+F | Replace | +--------------------------+--------------------+-----------------------------------+ +| + y | + y | Copy SQL on history panel | ++--------------------------+--------------------+-----------------------------------+ + **Debugger** When using the Debugger, the following shortcuts are available: ++--------------------------+--------------------+-----------------------------------+ +| Shortcut (Windows/Linux) | Shortcut (Mac) | Function | ++==========================+====================+===================================+ +| + i | + i | Step in | ++--------------------------+--------------------+-----------------------------------+ +| + o | + o | Step over | ++--------------------------+--------------------+-----------------------------------+ +| + c | + c | Continue/Restart | ++--------------------------+--------------------+-----------------------------------+ +| + t | + t | Toggle breakpoint | ++--------------------------+--------------------+-----------------------------------+ +| + x | + x | Clear all breakpoints | ++--------------------------+--------------------+-----------------------------------+ +| + s | + s | Stop | ++--------------------------+--------------------+-----------------------------------+ +| Alt + Shift + g | Alt + Shift + g | Enter or Edit values in Grid | ++--------------------------+--------------------+-----------------------------------+ + + +**Inner panel navigation** + +When using the Query Tool and Debugger, the following shortcuts are available for inner panel navigation: + +--------------------------+---------------------------+------------------------------+ | Shortcut (Windows/Linux) | Shortcut (Mac) | Function | +==========================+===========================+==============================+ -| + i | + i | Step in | -+--------------------------+---------------------------+------------------------------+ -| + o | + o | Step over | -+--------------------------+---------------------------+------------------------------+ -| + c | + c | Continue/Restart | -+--------------------------+---------------------------+------------------------------+ -| + t | + t | Toggle breakpoint | -+--------------------------+---------------------------+------------------------------+ -| + x | + x | Clear all breakpoints | -+--------------------------+---------------------------+------------------------------+ -| + s | + s | Stop | -+--------------------------+---------------------------+------------------------------+ | Alt + Shift + Right Arrow| Alt + Shift + Right Arrow | Move to next inner panel | +--------------------------+---------------------------+------------------------------+ | Alt + Shift + Left Arrow | Alt + Shift + Left Arrow | Move to previous inner panel | +--------------------------+---------------------------+------------------------------+ -| Alt + Shift + g | Alt + Shift + g | Enter or Edit values in Grid | -+--------------------------+---------------------------+------------------------------+ + .. note:: is browser and platform dependant. The following table lists the default access keys for supported browsers. + +-------------------+------------+------------+------------+ | | Windows | Linux | Mac | +===================+============+============+============+ diff --git a/web/pgadmin/misc/static/explain/js/explain.js b/web/pgadmin/misc/static/explain/js/explain.js index 7e25b2ed8..f406c3c47 100644 --- a/web/pgadmin/misc/static/explain/js/explain.js +++ b/web/pgadmin/misc/static/explain/js/explain.js @@ -762,6 +762,7 @@ define('pgadmin.misc.explain', [ zoomInBtn = $('', { class: 'btn pg-explain-zoom-btn badge', title: 'Zoom in', + tabindex: 0, }).appendTo(zoomArea).append( $('', { class: 'fa fa-search-plus', @@ -769,6 +770,7 @@ define('pgadmin.misc.explain', [ zoomToNormal = $('', { class: 'btn pg-explain-zoom-btn badge', title: 'Zoom to original', + tabindex: 0, }).appendTo(zoomArea).append( $('', { class: 'fa fa-arrows-alt', @@ -776,6 +778,7 @@ define('pgadmin.misc.explain', [ zoomOutBtn = $('', { class: 'btn pg-explain-zoom-btn badge', title: 'Zoom out', + tabindex: 0, }).appendTo(zoomArea).append( $('', { class: 'fa fa-search-minus', diff --git a/web/pgadmin/static/js/keyboard_shortcuts.js b/web/pgadmin/static/js/keyboard_shortcuts.js index 780e089c8..48229a11a 100644 --- a/web/pgadmin/static/js/keyboard_shortcuts.js +++ b/web/pgadmin/static/js/keyboard_shortcuts.js @@ -1,8 +1,14 @@ import $ from 'jquery'; +// Debugger const EDIT_KEY = 71, // Key: G -> Grid values LEFT_ARROW_KEY = 37, - RIGHT_ARROW_KEY = 39; + RIGHT_ARROW_KEY = 39, + F5_KEY = 116, + F7_KEY = 118, + F8_KEY = 119, + PERIOD_KEY = 190, + FWD_SLASH_KEY = 191; function isMac() { return window.navigator.platform.search('Mac') != -1; @@ -103,8 +109,62 @@ function getInnerPanel($el, direction) { return id; } +/* Query tool: Keyboard Shortcuts handling */ +function keyboardShortcutsQueryTool(sqlEditorController, queryToolActions, event) { + if (sqlEditorController.isQueryRunning()) { + return; + } + let keyCode = event.which || event.keyCode, panel_id; + + if (keyCode === F5_KEY) { + event.preventDefault(); + queryToolActions.executeQuery(sqlEditorController); + } else if (event.shiftKey && keyCode === F7_KEY) { + this._stopEventPropagation(event); + queryToolActions.explainAnalyze(sqlEditorController); + } else if (keyCode === F7_KEY) { + this._stopEventPropagation(event); + queryToolActions.explain(sqlEditorController); + } else if (keyCode === F8_KEY) { + event.preventDefault(); + queryToolActions.download(sqlEditorController); + } else if (( + (this.isMac() && event.metaKey) || + (!this.isMac() && event.ctrlKey) + ) && !event.altKey && event.shiftKey && keyCode === FWD_SLASH_KEY) { + this._stopEventPropagation(event); + queryToolActions.commentBlockCode(sqlEditorController); + } else if (( + (this.isMac() && !this.isKeyCtrlAltShift(event) && event.metaKey) || + (!this.isMac() && !this.isKeyAltShift(event) && event.ctrlKey) + ) && keyCode === FWD_SLASH_KEY) { + this._stopEventPropagation(event); + queryToolActions.commentLineCode(sqlEditorController); + } else if (( + (this.isMac() && !this.isKeyCtrlAltShift(event) && event.metaKey) || + (!this.isMac() && !this.isKeyAltShift(event) && event.ctrlKey) + ) && keyCode === PERIOD_KEY) { + this._stopEventPropagation(event); + queryToolActions.uncommentLineCode(sqlEditorController); + } else if (this.isAltShiftBoth(event) && keyCode === LEFT_ARROW_KEY) { + // Goto previous side panel + this._stopEventPropagation(event); + panel_id = this.getInnerPanel( + sqlEditorController.container, 'left' + ); + } else if (this.isAltShiftBoth(event) && keyCode === RIGHT_ARROW_KEY) { + // Goto next side panel + this._stopEventPropagation(event); + panel_id = this.getInnerPanel( + sqlEditorController.container, 'right' + ); + } + return panel_id; +} + module.exports = { processEventDebugger: keyboardShortcutsDebugger, + processEventQueryTool: keyboardShortcutsQueryTool, getInnerPanel: getInnerPanel, // misc functions _stopEventPropagation: _stopEventPropagation, diff --git a/web/pgadmin/static/js/sqleditor/keyboard_shortcuts.js b/web/pgadmin/static/js/sqleditor/keyboard_shortcuts.js deleted file mode 100644 index 2ad47557e..000000000 --- a/web/pgadmin/static/js/sqleditor/keyboard_shortcuts.js +++ /dev/null @@ -1,81 +0,0 @@ -const F5_KEY = 116, - F7_KEY = 118, - F8_KEY = 119, - PERIOD_KEY = 190, - FWD_SLASH_KEY = 191; - -function keyboardShortcuts(sqlEditorController, queryToolActions, event) { - if (sqlEditorController.isQueryRunning()) { - return; - } - - let keyCode = event.which || event.keyCode; - - if (keyCode === F5_KEY) { - event.preventDefault(); - queryToolActions.executeQuery(sqlEditorController); - } else if (event.shiftKey && keyCode === F7_KEY) { - _stopEventPropagation(); - queryToolActions.explainAnalyze(sqlEditorController); - } else if (keyCode === F7_KEY) { - _stopEventPropagation(); - queryToolActions.explain(sqlEditorController); - } else if (keyCode === F8_KEY) { - event.preventDefault(); - queryToolActions.download(sqlEditorController); - } else if (( - (this.isMac() && event.metaKey) || - (!this.isMac() && event.ctrlKey) - ) && !event.altKey && event.shiftKey && keyCode === FWD_SLASH_KEY) { - _stopEventPropagation(); - queryToolActions.commentBlockCode(sqlEditorController); - } else if (( - (this.isMac() && !this.isKeyCtrlAltShift(event) && event.metaKey) || - (!this.isMac() && !this.isKeyAltShift(event) && event.ctrlKey) - ) && keyCode === FWD_SLASH_KEY) { - _stopEventPropagation(); - queryToolActions.commentLineCode(sqlEditorController); - } else if (( - (this.isMac() && !this.isKeyCtrlAltShift(event) && event.metaKey) || - (!this.isMac() && !this.isKeyAltShift(event) && event.ctrlKey) - ) && keyCode === PERIOD_KEY) { - _stopEventPropagation(); - queryToolActions.uncommentLineCode(sqlEditorController); - } - - function _stopEventPropagation() { - event.cancelBubble = true; - event.preventDefault(); - event.stopPropagation(); - event.stopImmediatePropagation(); - } -} - -function isMac() { - return window.navigator.platform.search('Mac') != -1; -} - -function isKeyCtrlAlt(event) { - return event.ctrlKey || event.altKey; -} - -function isKeyAltShift(event) { - return event.altKey || event.shiftKey; -} - -function isKeyCtrlShift(event) { - return event.ctrlKey || event.shiftKey; -} - -function isKeyCtrlAltShift(event) { - return event.ctrlKey || event.altKey || event.shiftKey; -} - -module.exports = { - processEvent: keyboardShortcuts, - isMac: isMac, - isKeyCtrlAlt: isKeyCtrlAlt, - isKeyAltShift: isKeyAltShift, - isKeyCtrlShift: isKeyCtrlShift, - isKeyCtrlAltShift: isKeyCtrlAltShift, -}; diff --git a/web/pgadmin/static/jsx/history/detail/history_detail_query.jsx b/web/pgadmin/static/jsx/history/detail/history_detail_query.jsx index 22bd498b3..dce34607f 100644 --- a/web/pgadmin/static/jsx/history/detail/history_detail_query.jsx +++ b/web/pgadmin/static/jsx/history/detail/history_detail_query.jsx @@ -54,10 +54,13 @@ export default class HistoryDetailQuery extends React.Component { return (
- +
@@ -29,24 +28,25 @@
-
-
-
+
diff --git a/web/pgadmin/tools/sqleditor/static/css/sqleditor.css b/web/pgadmin/tools/sqleditor/static/css/sqleditor.css index 7088f8ee3..e6e8e3add 100644 --- a/web/pgadmin/tools/sqleditor/static/css/sqleditor.css +++ b/web/pgadmin/tools/sqleditor/static/css/sqleditor.css @@ -572,3 +572,8 @@ input.editor-checkbox:focus { .connection_status .fa-query-tool-disconnected { content: url('../img/disconnect.svg'); } + +.sql-editor .dropdown-toggle:focus, +.sql-editor .copy-all:focus { + outline: 5px auto -webkit-focus-ring-color; +} diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js index 3df96051d..94151e77a 100644 --- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js @@ -15,7 +15,7 @@ define('tools.querytool', [ 'sources/history/index.js', 'sources/../jsx/history/query_history', 'react', 'react-dom', - 'sources/sqleditor/keyboard_shortcuts', + 'sources/keyboard_shortcuts', 'sources/sqleditor/query_tool_actions', 'sources/../bundle/slickgrid', 'pgadmin.file_manager', @@ -110,6 +110,7 @@ define('tools.querytool', [ self.checkConnectionStatus(); self.filter_obj = CodeMirror.fromTextArea(filter.get(0), { + tabindex: '0', lineNumbers: true, mode: self.handler.server_type === 'gpdb' ? 'text/x-gpsql' : 'text/x-pgsql', foldOptions: { @@ -158,6 +159,8 @@ define('tools.querytool', [ theme: 'webcabin.overrides.css', }); + self.docker = main_docker; + var sql_panel = new pgAdmin.Browser.Panel({ name: 'sql_panel', title: false, @@ -170,11 +173,12 @@ define('tools.querytool', [ sql_panel.load(main_docker); var sql_panel_obj = main_docker.addPanel('sql_panel', wcDocker.DOCK.TOP); - var text_container = $(''); - var output_container = $('
').append(text_container); + var text_container = $(''); + var output_container = $('
').append(text_container); sql_panel_obj.$container.find('.pg-panel-content').append(output_container); self.query_tool_obj = CodeMirror.fromTextArea(text_container.get(0), { + tabindex: '0', lineNumbers: true, styleSelectedText: true, mode: self.handler.server_type === 'gpdb' ? 'text/x-gpsql' : 'text/x-pgsql', @@ -218,7 +222,7 @@ define('tools.querytool', [ height: '100%', isCloseable: false, isPrivate: true, - content: '
', + content: '
', }); var explain = new pgAdmin.Browser.Panel({ @@ -228,7 +232,7 @@ define('tools.querytool', [ height: '100%', isCloseable: false, isPrivate: true, - content: '
', + content: '
', }); var messages = new pgAdmin.Browser.Panel({ @@ -238,7 +242,7 @@ define('tools.querytool', [ height: '100%', isCloseable: false, isPrivate: true, - content: '
', + content: '
', }); var history = new pgAdmin.Browser.Panel({ @@ -248,7 +252,7 @@ define('tools.querytool', [ height: '100%', isCloseable: false, isPrivate: true, - content: '
', + content: '
', }); // Load all the created panels @@ -1540,8 +1544,8 @@ define('tools.querytool', [ return true; } ).set('labels', { - ok: 'Yes', - cancel: 'No', + ok: gettext('Yes'), + cancel: gettext('No'), }); } else { self.query_tool_obj.setValue(''); @@ -1569,8 +1573,8 @@ define('tools.querytool', [ return true; } ).set('labels', { - ok: 'Yes', - cancel: 'No', + ok: gettext('Yes'), + cancel: gettext('No'), }); }, @@ -1698,7 +1702,22 @@ define('tools.querytool', [ }, keyAction: function(event) { - keyboardShortcuts.processEvent(this.handler, queryToolActions, event); + var panel_id, self = this; + panel_id = keyboardShortcuts.processEventQueryTool( + this.handler, queryToolActions, event + ); + + // If it return panel id then focus it + if(!_.isNull(panel_id) && !_.isUndefined(panel_id)) { + // Returned panel index, by incrementing it by 1 we will get actual panel + panel_id++; + this.docker.findPanels()[panel_id].focus(); + // We set focus on history tab so we need to set the focus on + // editor explicitly + if(panel_id == 3) { + setTimeout(function() { self.query_tool_obj.focus(); }, 100); + } + } }, }); @@ -1827,8 +1846,8 @@ define('tools.querytool', [ return true; } ).set('labels', { - ok: 'Yes', - cancel: 'No', + ok: gettext('Yes'), + cancel: gettext('No'), }); } else { self._run_query(); diff --git a/web/regression/javascript/sqleditor/keyboard_shortcuts_spec.js b/web/regression/javascript/sqleditor/keyboard_shortcuts_spec.js index 3dafbce07..792eb819f 100644 --- a/web/regression/javascript/sqleditor/keyboard_shortcuts_spec.js +++ b/web/regression/javascript/sqleditor/keyboard_shortcuts_spec.js @@ -7,7 +7,7 @@ // ////////////////////////////////////////////////////////////////////////// -import keyboardShortcuts from 'sources/sqleditor/keyboard_shortcuts'; +import keyboardShortcuts from 'sources/keyboard_shortcuts'; import {queryToolActions} from 'sources/sqleditor/query_tool_actions'; describe('the keyboard shortcuts', () => { @@ -57,7 +57,7 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { event.which = F1_KEY; - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('should allow event to propagate', () => { @@ -69,7 +69,7 @@ describe('the keyboard shortcuts', () => { describe('when there is no query already running', () => { beforeEach(() => { event.keyCode = F5_KEY; - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('should execute the query', () => { @@ -86,7 +86,7 @@ describe('the keyboard shortcuts', () => { event.keyCode = F5_KEY; sqlEditorControllerSpy.isQueryRunning.and.returnValue(true); - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); expect(queryToolActionsSpy.executeQuery).not.toHaveBeenCalled(); }); @@ -97,7 +97,7 @@ describe('the keyboard shortcuts', () => { describe('when there is not a query already running', () => { beforeEach(() => { event.which = F7_KEY; - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('should explain the query plan', () => { @@ -112,7 +112,7 @@ describe('the keyboard shortcuts', () => { event.keyCode = F7_KEY; sqlEditorControllerSpy.isQueryRunning.and.returnValue(true); - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); expect(queryToolActionsSpy.explain).not.toHaveBeenCalled(); }); @@ -124,7 +124,7 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { event.shiftKey = true; event.which = F7_KEY; - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('should analyze explain the query plan', () => { @@ -140,7 +140,7 @@ describe('the keyboard shortcuts', () => { event.which = F7_KEY; sqlEditorControllerSpy.isQueryRunning.and.returnValue(true); - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); expect(queryToolActionsSpy.explainAnalyze).not.toHaveBeenCalled(); }); @@ -151,7 +151,7 @@ describe('the keyboard shortcuts', () => { describe('when there is not a query already running', () => { beforeEach(() => { event.which = F8_KEY; - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('should download the query results as a CSV', () => { @@ -168,7 +168,7 @@ describe('the keyboard shortcuts', () => { event.keyCode = F8_KEY; sqlEditorControllerSpy.isQueryRunning.and.returnValue(true); - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); expect(queryToolActionsSpy.download).not.toHaveBeenCalled(); }); @@ -181,7 +181,7 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { macKeysSetup(); event.which = FWD_SLASH_KEY; - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('should comment the line', () => { @@ -195,7 +195,7 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { windowsKeysSetup(); event.which = FWD_SLASH_KEY; - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('should comment the line', () => { @@ -217,7 +217,7 @@ describe('the keyboard shortcuts', () => { }); it('does nothing', () => { - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); expect(queryToolActionsSpy.commentLineCode).not.toHaveBeenCalled(); }); @@ -230,7 +230,7 @@ describe('the keyboard shortcuts', () => { }); it('does nothing', () => { - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); expect(queryToolActionsSpy.commentLineCode).not.toHaveBeenCalled(); }); @@ -244,7 +244,7 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { macKeysSetup(); event.which = PERIOD_KEY; - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('should uncomment the line', () => { @@ -257,7 +257,7 @@ describe('the keyboard shortcuts', () => { beforeEach(() => { windowsKeysSetup(); event.which = PERIOD_KEY; - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('should uncomment the line', () => { @@ -279,7 +279,7 @@ describe('the keyboard shortcuts', () => { }); it('does nothing', () => { - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); expect(queryToolActionsSpy.uncommentLineCode).not.toHaveBeenCalled(); }); }); @@ -290,7 +290,7 @@ describe('the keyboard shortcuts', () => { }); it('does nothing', () => { - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); expect(queryToolActionsSpy.uncommentLineCode).not.toHaveBeenCalled(); }); @@ -305,7 +305,7 @@ describe('the keyboard shortcuts', () => { macKeysSetup(); event.which = FWD_SLASH_KEY; event.shiftKey = true; - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('should comment out the block selection', () => { @@ -322,7 +322,7 @@ describe('the keyboard shortcuts', () => { windowsKeysSetup(); event.which = FWD_SLASH_KEY; event.shiftKey = true; - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('should comment out the block selection', () => { @@ -342,7 +342,7 @@ describe('the keyboard shortcuts', () => { macKeysSetup(); event.which = FWD_SLASH_KEY; event.shiftKey = true; - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('does nothing', () => { expect(queryToolActionsSpy.commentBlockCode).not.toHaveBeenCalled(); @@ -353,7 +353,7 @@ describe('the keyboard shortcuts', () => { windowsKeysSetup(); event.which = FWD_SLASH_KEY; event.shiftKey = true; - keyboardShortcuts.processEvent(sqlEditorControllerSpy, queryToolActionsSpy, event); + keyboardShortcuts.processEventQueryTool(sqlEditorControllerSpy, queryToolActionsSpy, event); }); it('does nothing', () => { expect(queryToolActionsSpy.commentBlockCode).not.toHaveBeenCalled();