summaryrefslogtreecommitdiff
path: root/Userland/Utilities/less.cpp
diff options
context:
space:
mode:
authorBrandon van Houten <brandon.vhouten@gmail.com>2021-07-12 12:33:33 +0200
committerGunnar Beutner <gunnar@beutner.name>2021-07-12 16:10:01 +0200
commit19d34414bccc62202064077f8150cc8b57fc64b6 (patch)
tree4f9d45702350dcd87a613b715edfb67f8cd47b73 /Userland/Utilities/less.cpp
parentf99507bf02d5c108f68c3fff204a2da64afed34d (diff)
downloadserenity-19d34414bccc62202064077f8150cc8b57fc64b6.zip
Utilities: Make `less` accept 'page up' and 'page down' keys
Diffstat (limited to 'Userland/Utilities/less.cpp')
-rw-r--r--Userland/Utilities/less.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Utilities/less.cpp b/Userland/Utilities/less.cpp
index 34728104e4..ccb0cf5542 100644
--- a/Userland/Utilities/less.cpp
+++ b/Userland/Utilities/less.cpp
@@ -369,8 +369,10 @@ int main(int argc, char** argv)
} else if (sequence == "k" || sequence == "\e[A") {
if (!emulate_more)
pager.up();
- } else if (sequence == " ") {
+ } else if (sequence == " " || sequence == "\e[6~") {
pager.down_page();
+ } else if (sequence == "\e[5~") {
+ pager.up_page();
}
if (quit_at_eof && pager.at_end())