From a88c48b4096c91ead0ff22c2079619f553e3cfe8 Mon Sep 17 00:00:00 2001 From: Jan Sarenik Date: Wed, 2 Sep 2009 20:03:19 +0200 Subject: [PATCH] cfdisk: more key alternatives Signed-off-by: Jan Sarenik --- fdisk/cfdisk.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c index 1846e11c..0405e126 100644 --- a/fdisk/cfdisk.c +++ b/fdisk/cfdisk.c @@ -137,7 +137,9 @@ #define TAB '\011' #define REDRAWKEY '\014' /* ^L */ #define UPKEY '\020' /* ^P */ +#define UPKEYVI '\153' /* k */ #define DOWNKEY '\016' /* ^N */ +#define DOWNKEYVI '\152' /* j */ /* Display units */ #define GIGABYTES 1 @@ -1270,6 +1272,7 @@ menuSelect( int y, int x, struct MenuItem *menuItems, int itemLength, key = MENU_RIGHT; break; case 'D': /* Left arrow */ + case 'Z': /* Shift Tab */ key = MENU_LEFT; break; default: @@ -1286,9 +1289,9 @@ menuSelect( int y, int x, struct MenuItem *menuItems, int itemLength, swallows these */ if (key == TAB) key = MENU_RIGHT; - if (key == UPKEY) /* ^P */ + if (key == UPKEY || key == UPKEYVI) /* ^P or k */ key = MENU_UP; - if (key == DOWNKEY) /* ^N */ + if (key == DOWNKEY || key == DOWNKEYVI) /* ^N or j */ key = MENU_DOWN; if (key == MENU_UP) { -- 2.39.5