dao::input::Action

struct

An action for RegisterAction: its name, its label, its default key, and the game modes where the key works.

Declared in dao/Input.h.

Fields

Field Type  
key Key = Key::None the default key, or Key::None for no default
keymap std::wstring = {} The plugin’s key map the action belongs to, or empty for none. An action in a key map and one outside it may have the same key, and the action answers only while its map is on (SetKeymap). An initializer, so a plugin may leave the field out of its designated initializer.
label std::wstring the text shown in the controls screen
modes std::vector<GameMode> = {GameMode::Explore, GameMode::Combat} The game modes in which the key works. GameMode::Loading is ignored.
modifiers std::uint32_t = 0 the default key’s modifiers: kShift, kControl and kAlt, or’d
name std::wstring The action’s name in KeyBindings.ini and inside the game. Use letters and digits, starting with a letter. Prefix it with the plugin’s name, for example “MyPluginEndTurn”: a name that the game or another plugin already uses is refused.
section std::wstring = L"Mods" The heading the controls screen lists the action under. Actions with the same section share a heading.