]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
console: CTRL+k for terminating line at cursor
authornyov <nyov@nexnode.net>
Sat, 3 Dec 2011 17:24:51 +0000 (18:24 +0100)
committernyov <nyov@nexnode.net>
Sat, 3 Dec 2011 20:15:15 +0000 (21:15 +0100)
keys.c

diff --git a/keys.c b/keys.c
index 18b7a8446ed91e485485dce36603236ef4da46a0..2369407fec82cd7bb7ad6c32a36d01bbbe4d2bfa 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -953,6 +953,12 @@ Key_Console (int key, int unicode)
                return;
        }
 
+       // nyov: delete char on cursor and terminate rest of line
+       if (key == 'k' && keydown[K_CTRL])
+       {
+               key_line[key_linepos] = 0;
+               return;
+       }
 
        // move cursor to the next character
        if (key == K_RIGHTARROW || key == K_KP_RIGHTARROW)