From 75e805d1f198a1bf3dd7f71d1817e2d19a55ba82 Mon Sep 17 00:00:00 2001 From: nick black Date: Sat, 8 Aug 2020 21:20:47 -0400 Subject: [PATCH] selector/multiselect: interpret pgdown/up as arrows #862 --- src/lib/selector.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lib/selector.c b/src/lib/selector.c index d1aecf7b4..d01c42f33 100644 --- a/src/lib/selector.c +++ b/src/lib/selector.c @@ -448,6 +448,12 @@ bool ncselector_offer_input(ncselector* n, const ncinput* nc){ }else if(nc->id == NCKEY_SCROLL_DOWN){ ncselector_nextitem(n); return true; + }else if(nc->id == NCKEY_PGDOWN){ + ncselector_nextitem(n); // FIXME should be a page's worth, or go to bottom + return true; + }else if(nc->id == NCKEY_PGUP){ + ncselector_previtem(n); // FIXME should be a page's worth, or go to top + return true; }else if(nc->id == NCKEY_RELEASE){ int y = nc->y, x = nc->x; if(!ncplane_translate_abs(n->ncp, &y, &x)){ @@ -692,6 +698,12 @@ bool ncmultiselector_offer_input(ncmultiselector* n, const ncinput* nc){ }else if(nc->id == NCKEY_DOWN){ ncmultiselector_nextitem(n); return true; + }else if(nc->id == NCKEY_PGDOWN){ + ncmultiselector_nextitem(n); // FIXME should be a page's worth, or go to bottom + return true; + }else if(nc->id == NCKEY_PGUP){ + ncmultiselector_previtem(n); // FIXME should be a page's worth, or go to top + return true; }else if(nc->id == NCKEY_SCROLL_UP){ ncmultiselector_previtem(n); return true;