summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/core/ui/choicebox.lua5
-rw-r--r--xmake/core/ui/menuconf.lua5
2 files changed, 10 insertions, 0 deletions
diff --git a/xmake/core/ui/choicebox.lua b/xmake/core/ui/choicebox.lua
index 72964e4d0..f53f53d0f 100644
--- a/xmake/core/ui/choicebox.lua
+++ b/xmake/core/ui/choicebox.lua
@@ -160,6 +160,11 @@ function choicebox:on_event(e)
end
self:_notify_scrolled()
return true
+ elseif e.key_name == "PageDown" or e.key_name == "PageUp" then
+ local direction = e.key_name == "PageDown" and 1 or -1
+ self:scroll(self:height() * direction)
+ self:_notify_scrolled()
+ return true
elseif e.key_name == "Enter" or e.key_name == " " then
self:_do_select()
return true
diff --git a/xmake/core/ui/menuconf.lua b/xmake/core/ui/menuconf.lua
index 05e7a65f0..f0b128fc2 100644
--- a/xmake/core/ui/menuconf.lua
+++ b/xmake/core/ui/menuconf.lua
@@ -175,6 +175,11 @@ function menuconf:on_event(e)
end
self:_notify_scrolled()
return true
+ elseif e.key_name == "PageDown" or e.key_name == "PageUp" then
+ local direction = e.key_name == "PageDown" and 1 or -1
+ self:scroll(self:height() * direction)
+ self:_notify_scrolled()
+ return true
elseif e.key_name == "Enter" or e.key_name == " " then
self:_do_select()
return true