Re: [PATCH v2 2/2] menuconfig: add Home and End keys support for inputbox

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/09/2012 03:36 AM, Paulius Zaleckas wrote:
> Makes long string editing easier.
> 
> Signed-off-by: Paulius Zaleckas <paulius.zaleckas@xxxxxxxxx>

Hi,

Does "default hostname" in the "General setup" menu use an inputbox?
If so, I can't get Home and End keys to work for it.

If not, please tell me a field that uses an inputbox so that I can test it.

Thanks.

> ---
> 
>  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) {
> 
> --


-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux