From fe788a37f4768d0b149a0531c92a217ef4daa2d8 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Wed, 14 Feb 2024 17:17:20 -0800 Subject: [PATCH] don't intercept scroll keys since some people bind the arrow keys to wasd movement --- docs/gui/notify.rst | 3 ++- gui/notify.lua | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/gui/notify.rst b/docs/gui/notify.rst index 916f24749a..09534ab115 100644 --- a/docs/gui/notify.rst +++ b/docs/gui/notify.rst @@ -23,4 +23,5 @@ Overlay This script provides an overlay that shows the currently enabled notifications (when applicable). If you click on an active notification in the list, it will zoom the map to the target. If there are multiple targets, each successive -click on the notification will zoom to the next target. +click on the notification (or press of the :kbd:`Enter` key) will zoom to the +next target. diff --git a/gui/notify.lua b/gui/notify.lua index 3110da4abb..370e5fa934 100644 --- a/gui/notify.lua +++ b/gui/notify.lua @@ -30,6 +30,9 @@ function NotifyOverlay:init() widgets.List{ view_id='list', frame={t=0, b=0, l=0, r=0}, + -- disable scrolling with the keyboard since some people + -- have wasd mapped to the arrow keys + scroll_keys={}, on_submit=function(_, choice) choice.state = choice.data.on_click(choice.state) end, @@ -71,7 +74,7 @@ function NotifyOverlay:overlay_onupdate() local _, selected = list:getSelected() if selected then for i, v in ipairs(choices) do - if v.name == selected.name then + if v.data.name == selected.data.name then idx = i break end