From b3a37dd0a4efbbffdc401b9876a10ab5e2e9b0d4 Mon Sep 17 00:00:00 2001 From: sphynkx Date: Sat, 7 Sep 2024 00:22:22 +0300 Subject: [PATCH] Add some functional: In panels mode the <- and -> arrows move cursor up and down through directory (like PgUp and PgDown) In viewer mode F3 also exits from viewer to panels mode. Add appropriate info in help screen Changes to be committed: modified: dirviewcmd.c modified: help.c modified: viewercmd.c --- dirviewcmd.c | 2 ++ help.c | 2 ++ viewercmd.c | 3 +++ 3 files changed, 7 insertions(+) diff --git a/dirviewcmd.c b/dirviewcmd.c index 94ca162..9bab137 100644 --- a/dirviewcmd.c +++ b/dirviewcmd.c @@ -493,6 +493,8 @@ Binding dirviewbindings[] = { { Kend, cmdend }, { Kpgup, cmdpageup }, { Kpgdown, cmdpagedown }, + { Kleft, cmdpageup }, + { Kright, cmdpagedown }, nil }; diff --git a/help.c b/help.c index 101c1a8..9a3a560 100644 --- a/help.c +++ b/help.c @@ -11,6 +11,8 @@ char help[] = "Key bindings:\n" " Up - move selection to previous item\n" " Down - move selection to next item\n" + " Left - move selection up one page\n" + " Right - move selection down one page\n" " PageUp - move selection up one page\n" " PageDown - move selection down one page\n" " Home - move selection to the first element in the directory\n" diff --git a/viewercmd.c b/viewercmd.c index a5333b9..b495182 100644 --- a/viewercmd.c +++ b/viewercmd.c @@ -47,6 +47,7 @@ cmdpagedown(void) } Binding viewerbindings[] = { + { KF|3, cmdquit }, { KF|10, cmdquit }, { Kup, cmdup }, { Kdown, cmddown }, @@ -54,6 +55,7 @@ Binding viewerbindings[] = { { Kend, cmdend }, { Kpgup, cmdpageup }, { Kpgdown, cmdpagedown }, + { Kesc, cmdquit }, nil }; @@ -62,5 +64,6 @@ setupviewerbindings(void) { bindings = viewerbindings; actionbarclear(abar); + actionbarset(abar, 3, "Quit", cmdquit); actionbarset(abar, 10, "Quit", cmdquit); }