diff options
author | jkh <jkh@FreeBSD.org> | 1996-09-01 08:16:00 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-09-01 08:16:00 +0000 |
commit | caca6152f0af9041e8fa64d01d0a7783222ceb41 (patch) | |
tree | 8218d66a2b054e4ee35e72dffa93930a2f5838ad /gnu/lib/libdialog | |
parent | a121020789f86211bf38966e5ff243b33abb545c (diff) | |
download | FreeBSD-src-caca6152f0af9041e8fa64d01d0a7783222ceb41.zip FreeBSD-src-caca6152f0af9041e8fa64d01d0a7783222ceb41.tar.gz |
Collapse some common arrow key handling semantics from sysinstall into
PollObj(), simplifying code which uses it.
Diffstat (limited to 'gnu/lib/libdialog')
-rw-r--r-- | gnu/lib/libdialog/ui_objects.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gnu/lib/libdialog/ui_objects.c b/gnu/lib/libdialog/ui_objects.c index c588b94..e1ef014 100644 --- a/gnu/lib/libdialog/ui_objects.c +++ b/gnu/lib/libdialog/ui_objects.c @@ -122,6 +122,7 @@ ReadObj(ComposeObj *Obj) break; } switch(ret) { + case KEY_DOWN: case SEL_CR: case SEL_TAB: /* move to the next object in the list */ if (o->next != NULL) { @@ -130,6 +131,8 @@ ReadObj(ComposeObj *Obj) o = Obj; /* beginning of the list */ } break; + + case KEY_UP: case SEL_BACKTAB: /* move to the previous object in the list */ if (o->prev != NULL) { o = o->prev; /* previous object */ @@ -137,6 +140,7 @@ ReadObj(ComposeObj *Obj) o = last; /* end of the list */ } break; + case KEY_F(1): /* display help_file */ case '?': display_helpfile(); @@ -177,6 +181,7 @@ PollObj(ComposeObj **Obj) break; } switch(ret) { + case KEY_DOWN: case SEL_CR: case SEL_TAB: /* move to the next object in the list */ if ((*Obj)->next != NULL) { @@ -185,6 +190,8 @@ PollObj(ComposeObj **Obj) *Obj = first; /* beginning of the list */ } break; + + case KEY_UP: case SEL_BACKTAB: /* move to the previous object in the list */ if ((*Obj)->prev != NULL) { *Obj = (*Obj)->prev; /* previous object */ |