Skip to content

Commit

Permalink
don't intercept scroll keys
Browse files Browse the repository at this point in the history
since some people bind the arrow keys to wasd movement
  • Loading branch information
myk002 committed Feb 15, 2024
1 parent f7d60ae commit fe788a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/gui/notify.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
5 changes: 4 additions & 1 deletion gui/notify.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fe788a3

Please sign in to comment.