From 46ed6303a28f24477b03f00e2b93e6f11bef5ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miika=20H=C3=A4mynen?= Date: Sun, 6 Feb 2022 13:23:00 +0200 Subject: [PATCH] less: Add hotkeys f and b to scroll screen up/down --- Base/usr/share/man/man1/less.md | 3 ++- Userland/Utilities/less.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Base/usr/share/man/man1/less.md b/Base/usr/share/man/man1/less.md index 9327d060ed..459a1a1db1 100644 --- a/Base/usr/share/man/man1/less.md +++ b/Base/usr/share/man/man1/less.md @@ -35,7 +35,8 @@ does not exist, and no command use `N`. | `q` | Exit less. | | `j` or `DOWNARROW` or `ENTER` | Go to the next line. | | `k` or `UPARROW` | Go to the previous line. | -| `SPACE` | Go to the next page. | +| `f` or `SPACE` | Go to the next page. | +| `b` | Go to the previous page. | ## Prompts diff --git a/Userland/Utilities/less.cpp b/Userland/Utilities/less.cpp index ae8c40213d..b526116eca 100644 --- a/Userland/Utilities/less.cpp +++ b/Userland/Utilities/less.cpp @@ -622,9 +622,9 @@ ErrorOr serenity_main(Main::Arguments arguments) else pager.bottom(); } - } else if (sequence == " " || sequence == "\e[6~") { + } else if (sequence == " " || sequence == "f" || sequence == "\e[6~") { pager.down_page(); - } else if (sequence == "\e[5~" && !emulate_more) { + } else if ((sequence == "\e[5~" || sequence == "b") && !emulate_more) { pager.up_page(); } else if (sequence == "d") { pager.down_half_page();