diff mbox

lxdialog:inputbox: Fix can't change selected button with Left/Right when input box selected

Message ID 20121202163509.GB20796@udknight (mailing list archive)
State New, archived
Headers show

Commit Message

wang yanqing Dec. 2, 2012, 4:35 p.m. UTC
inputbox code don't support use Left/Right to change input
position in the input box, so it use continue to skip them
when input key is Left/Right, but use break for Up/Down, so
we can change selected button with Up/Down but we can't do it
with Left/Right key when input box selected.

This patch fix it.

Signed-off-by: Wang YanQing <udknight@gmail.com>
---
 scripts/kconfig/lxdialog/inputbox.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Yann E. MORIN Dec. 2, 2012, 5:32 p.m. UTC | #1
Wang, All,

On Sunday 02 December 2012 Wang YanQing wrote:
> inputbox code don't support use Left/Right to change input
> position in the input box, so it use continue to skip them
> when input key is Left/Right, but use break for Up/Down, so
> we can change selected button with Up/Down but we can't do it
> with Left/Right key when input box selected.
> This patch fix it.

Although I do understand the motivation behind your change, may I suggest
that left/right are used to navigate *inside* the input field, so it is
possible to modify the text in place?

The nconf frontend allows editing text in place, so I find it disturbing
not to be able to do it in mconf.

Regards,
Yann E. MORIN.
wang yanqing Dec. 3, 2012, 4:47 a.m. UTC | #2
On Sun, Dec 02, 2012 at 06:32:43PM +0100, Yann E. MORIN wrote:
> Wang, All,
> 
> On Sunday 02 December 2012 Wang YanQing wrote:
> > inputbox code don't support use Left/Right to change input
> > position in the input box, so it use continue to skip them
> > when input key is Left/Right, but use break for Up/Down, so
> > we can change selected button with Up/Down but we can't do it
> > with Left/Right key when input box selected.
> > This patch fix it.
> 
> Although I do understand the motivation behind your change, may I suggest
> that left/right are used to navigate *inside* the input field, so it is
> possible to modify the text in place?
Hi Yann,All,
I understand what you say, and I also want inputbox support
changing input position with Left/Right. But this patch is accepted 
before somebody make it come true, right?

Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c
index dd8e587..7841f46 100644
--- a/scripts/kconfig/lxdialog/inputbox.c
+++ b/scripts/kconfig/lxdialog/inputbox.c
@@ -120,11 +120,9 @@  do_resize:
 			case TAB:
 			case KEY_UP:
 			case KEY_DOWN:
-				break;
 			case KEY_LEFT:
-				continue;
 			case KEY_RIGHT:
-				continue;
+				break;
 			case KEY_BACKSPACE:
 			case 127:
 				if (input_x || scroll) {