MCPcopy Create free account
hub / github.com/DFHack/dfhack / hotkey_addKeybind

Function hotkey_addKeybind

library/LuaApi.cpp:1873–1877  ·  view source on GitHub ↗

Hotkey module *****/

Source from the content-addressed store, hash-verified

1871
1872/***** Hotkey module *****/
1873static bool hotkey_addKeybind(const std::string spec, const std::string cmd) {
1874 auto hotkey_mgr = Core::getInstance().getHotkeyManager();
1875 if (!hotkey_mgr) return false;
1876 return hotkey_mgr->addKeybind(spec, cmd);
1877}
1878
1879static bool hotkey_isDisruptiveKeybind(const std::string spec) {
1880 auto key = Hotkey::KeySpec::parse(spec);

Callers

nothing calls this directly

Calls 1

addKeybindMethod · 0.80

Tested by

no test coverage detected