diff --git a/docs/changelog.txt b/docs/changelog.txt index b90248c91..c2811c7a9 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -70,6 +70,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences: - `spectate`: improved documentation of features and functionality ## API +- ``Gui::anywhere_hotkey``: for plugin commands bound to keybindings that can be invoked on any screen - ``Lua::PushInterfaceKeys()``: transforms viewscreen ``feed()`` keys into something that can be interpreted by lua-based widgets - ``Lua::Push()``: now handles maps with otherwise supported keys and values - Constructions module: added ``insert()`` to insert constructions into the game's sorted list. diff --git a/library/include/PluginManager.h b/library/include/PluginManager.h index 79b7e0492..6bef8a74c 100644 --- a/library/include/PluginManager.h +++ b/library/include/PluginManager.h @@ -301,6 +301,7 @@ namespace DFHack { // Predefined hotkey guards DFHACK_EXPORT bool default_hotkey(df::viewscreen *); + DFHACK_EXPORT bool anywhere_hotkey(df::viewscreen *); DFHACK_EXPORT bool dwarfmode_hotkey(df::viewscreen *); DFHACK_EXPORT bool cursor_hotkey(df::viewscreen *); } diff --git a/library/modules/Gui.cpp b/library/modules/Gui.cpp index 56aa09b7f..7f2097f43 100644 --- a/library/modules/Gui.cpp +++ b/library/modules/Gui.cpp @@ -630,6 +630,10 @@ bool Gui::default_hotkey(df::viewscreen *top) return false; } +bool Gui::anywhere_hotkey(df::viewscreen *) { + return true; +} + bool Gui::dwarfmode_hotkey(df::viewscreen *top) { // Require the main dwarf mode screen