mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-02 13:29:11 -06:00
Fix more of the funky keyboard shortcuts.
This commit is contained in:
parent
37ca3579f3
commit
1bcac0b67c
@ -320,7 +320,8 @@ function(require, $, _, S, Bootstrap, pgAdmin, alertify, CodeMirror) {
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
mode: "text/x-pgsql",
|
||||
readOnly: true
|
||||
readOnly: true,
|
||||
extraKeys: pgAdmin.Browser.editor_shortcut_keys
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
@ -708,6 +709,38 @@ function(require, $, _, S, Bootstrap, pgAdmin, alertify, CodeMirror) {
|
||||
});
|
||||
|
||||
return preference;
|
||||
},
|
||||
|
||||
editor_shortcut_keys: {
|
||||
// Autocomplete sql command
|
||||
"Ctrl-Space": "autocomplete",
|
||||
"Cmd-Space": "autocomplete",
|
||||
|
||||
// Select All text
|
||||
"Ctrl-A": "selectAll",
|
||||
"Cmd-A": "selectAll",
|
||||
|
||||
// Redo text
|
||||
"Ctrl-Y": "redo",
|
||||
"Cmd-Y": "redo",
|
||||
|
||||
// Undo text
|
||||
"Ctrl-Z": "undo",
|
||||
"Cmd-Z": "undo",
|
||||
|
||||
// Delete Line
|
||||
"Ctrl-D": "deleteLine",
|
||||
"Cmd-D": "deleteLine",
|
||||
|
||||
// Go to start/end of Line
|
||||
"Alt-Left": "goLineStart",
|
||||
"Alt-Right": "goLineEnd",
|
||||
|
||||
// Move word by word left/right
|
||||
"Ctrl-Alt-Left": "goGroupLeft",
|
||||
"Cmd-Alt-Left": "goGroupLeft",
|
||||
"Ctrl-Alt-Right": "goGroupRight"
|
||||
"Cmd-Alt-Right": "goGroupRight"
|
||||
}
|
||||
|
||||
});
|
||||
|
@ -1392,7 +1392,8 @@
|
||||
lineNumbers: true,
|
||||
lineWrapping: true,
|
||||
mode: "text/x-pgsql",
|
||||
readOnly: true
|
||||
readOnly: true,
|
||||
extraKeys: pgAdmin.Browser.editor_shortcut_keys
|
||||
});
|
||||
|
||||
return this;
|
||||
@ -2118,7 +2119,8 @@
|
||||
(self.$el.find("textarea")[0]), {
|
||||
lineNumbers: true,
|
||||
mode: "text/x-sql",
|
||||
readOnly: isDisabled
|
||||
readOnly: isDisabled,
|
||||
extraKeys: pgAdmin.Browser.editor_shortcut_keys
|
||||
});
|
||||
|
||||
if (!isVisible)
|
||||
|
@ -243,7 +243,8 @@ define(
|
||||
lineWrapping: true,
|
||||
matchBrackets: true,
|
||||
indentUnit: 4,
|
||||
mode: "text/x-pgsql"
|
||||
mode: "text/x-pgsql",
|
||||
extraKeys: pgBrowser.editor_shortcut_keys
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -1422,7 +1422,8 @@ define(
|
||||
},
|
||||
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter", "breakpoints"],
|
||||
mode: "text/x-pgsql",
|
||||
readOnly: true
|
||||
readOnly: true,
|
||||
extraKeys: pgAdmin.Browser.editor_shortcut_keys
|
||||
});
|
||||
|
||||
// On loading the docker, register the callbacks
|
||||
|
@ -206,7 +206,8 @@ define(
|
||||
rangeFinder: CodeMirror.fold.combine(CodeMirror.pgadminBeginRangeFinder, CodeMirror.pgadminIfRangeFinder,
|
||||
CodeMirror.pgadminLoopRangeFinder, CodeMirror.pgadminCaseRangeFinder)
|
||||
},
|
||||
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"]
|
||||
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
|
||||
extraKeys: pgBrowser.editor_shortcut_keys
|
||||
});
|
||||
|
||||
// Create main wcDocker instance
|
||||
@ -248,7 +249,7 @@ define(
|
||||
CodeMirror.pgadminLoopRangeFinder, CodeMirror.pgadminCaseRangeFinder)
|
||||
},
|
||||
gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
|
||||
extraKeys: {"Ctrl-Space": "autocomplete"}
|
||||
extraKeys: pgBrowser.editor_shortcut_keys
|
||||
});
|
||||
|
||||
// Create panels for 'Data Output', 'Explain', 'Messages' and 'History'
|
||||
|
Loading…
Reference in New Issue
Block a user