Merge pull request #14726 from Bakke/feature/console-hotkeys

Console: ctrl+l clear line and ctrl+u clear console
This commit is contained in:
Maurício Meneghini Fauth 2019-02-27 14:15:19 -03:00 committed by GitHub
commit c74f124bf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -625,6 +625,7 @@ var PMA_consoleInput = {
* @return void
*/
_keydown: function (event) {
// Execute command
if (PMA_console.config.EnterExecutes) {
// Enter, but not in combination with Shift (which writes a new line).
if (!event.shiftKey && event.keyCode === 13) {
@ -636,6 +637,14 @@ var PMA_consoleInput = {
PMA_consoleInput.execute();
}
}
// Clear line
if (event.ctrlKey && event.keyCode === 76) {
PMA_consoleInput.clear();
}
// Clear console
if (event.ctrlKey && event.keyCode === 85) {
PMA_consoleMessages.clear();
}
},
/**
* Used for send text to PMA_console.execute()