Page 1 of 1

[v1.3.0+] Menu Keys

Posted: Wed Jan 29, 2020 1:42 am
by Zizzo
Inspired by an idea on the Steam forum, I've whipped up a quick Menu Keys addon which adds shortcut keys to the <Esc> game menu. We add mnemonics for all the actions defined by the engine and the game module, and addons that add actions to the game menu via the Game:alterGameMenu hook can also specify their preferred mnemonic in the action definition:

Code: Select all

class:bindHook('Game:alterGameMenu', function(self, data)
  data.menu[#data.menu+1] = {
    -- The usual stuff for adding a game menu action.
    "Do a Thing",
    function() do_thing() end,
    -- Your preferred mnemonic.
    mnemonic = 'T',
  }
end)
In particular, by the time you see this, I should have updated releases of Go to Landmark and Savefile Notes that define mnemonics for their respective game menu actions.

[And looking ahead, this seems like an obvious candidate for eventual inclusion in a future version of ZOmnibus.]

Re: [v1.3.0+] Menu Keys

Posted: Thu Sep 30, 2021 11:17 pm
by Zizzo
As requested on the Steam page, v1b adds game option "[ZOmnibus] | Show menu keys" to turn off this functionality. In case you like every part of ZOmnibus but this. :wink: