From a17eeb847e66824c4d389751cc90415d3fc1c5a3 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 25 Oct 2009 23:50:56 +0100 Subject: lineedit: handle Ctrl-arrows function old new delta read_line_input 4629 4824 +195 BB_isalnum - 39 +39 BB_ispunct - 35 +35 BB_isspace - 31 +31 static.esccmds 69 93 +24 vi_word_motion 165 162 -3 vi_back_motion 204 198 -6 vi_end_motion 172 163 -9 bb_iswspace 28 - -28 bb_iswpunct 32 - -32 bb_iswalnum 37 - -37 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 5/8 up/down: 334/-129) Total: 205 bytes Signed-off-by: Denys Vlasenko --- include/libbb.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index a1744ec..6274ea2 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1203,6 +1203,11 @@ enum { KEYCODE_DELETE = -9, KEYCODE_PAGEUP = -10, KEYCODE_PAGEDOWN = -11, + + KEYCODE_CTRL_UP = KEYCODE_UP & ~0x40, + KEYCODE_CTRL_DOWN = KEYCODE_DOWN & ~0x40, + KEYCODE_CTRL_RIGHT = KEYCODE_RIGHT & ~0x40, + KEYCODE_CTRL_LEFT = KEYCODE_LEFT & ~0x40, #if 0 KEYCODE_FUN1 = -12, KEYCODE_FUN2 = -13, -- cgit v1.1