lkml.org 
[lkml]   [2012]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 2/2] menuconfig: add Home and End keys support for inputbox
Date
Makes long string editing easier.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
---

scripts/kconfig/lxdialog/inputbox.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c
index 834eee9..0d9cacc 100644
--- a/scripts/kconfig/lxdialog/inputbox.c
+++ b/scripts/kconfig/lxdialog/inputbox.c
@@ -158,6 +158,16 @@ do_resize:
goto redraw;
}
continue;
+ case KEY_HOME:
+ scroll = input_x = 0;
+ goto redraw;
+ case KEY_END:
+ if (len >= box_width) {
+ scroll = len - box_width + 1;
+ input_x = box_width - 1;
+ } else
+ input_x = len;
+ goto redraw;
default:
if (key < 0x100 && isprint(key)) {
if (len < MAX_LEN) {


\
 
 \ /
  Last update: 2012-01-09 12:39    [W:0.695 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site