summaryrefslogtreecommitdiff
path: root/console.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-05-30 16:03:21 +0000
committerDarkvater <Darkvater@openttd.org>2005-05-30 16:03:21 +0000
commit53b1de7d70c92d78d3ef5d5d6021bea0bfe39073 (patch)
treeb3abbef3ec0c78027bf6b01ef5ca1b7b224c77fe /console.c
parent2d355e0826fc32e9b40a1b0d9b623362b9ea45f5 (diff)
downloadopenttd-53b1de7d70c92d78d3ef5d5d6021bea0bfe39073.tar.xz
(svn r2385) - Feature: shortcut CTRL + U that clears the commandline of the current input-box. As requested by Tron.
Diffstat (limited to 'console.c')
-rw-r--r--console.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/console.c b/console.c
index cccba3beb..ebe47a87c 100644
--- a/console.c
+++ b/console.c
@@ -151,9 +151,13 @@ static void IConsoleWndProc(Window* w, WindowEvent* e)
SetWindowDirty(w);
}
break;
- case (WKC_CTRL | 'L'):
+ case (WKC_CTRL | 'L'):
IConsoleCmdExec("clear");
break;
+ case (WKC_CTRL | 'U'):
+ DeleteTextBufferAll(&_iconsole_cmdline);
+ SetWindowDirty(w);
+ break;
case WKC_BACKSPACE: case WKC_DELETE:
if (DeleteTextBufferChar(&_iconsole_cmdline, e->keypress.keycode)) {
IConsoleResetHistoryPos();