From 0aca51484b601f7e7e949026b1535830f4abedfd Mon Sep 17 00:00:00 2001 From: Magnus Hauge Bakke Date: Wed, 14 Nov 2018 21:59:32 +0100 Subject: [PATCH] Console: ctrl+l clear line and ctrl+u clear console Signed-off-by: Magnus Hauge Bakke --- js/console.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/console.js b/js/console.js index 98a4716c6f..791af012bd 100644 --- a/js/console.js +++ b/js/console.js @@ -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()