MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / tryShortcut

Function tryShortcut

src/OpenLoco/src/Input/Keyboard.cpp:253–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251 }
252
253 static bool tryShortcut(Shortcut sc, uint32_t keyCode, KeyModifier modifiers)
254 {
255 auto cfg = OpenLoco::Config::get();
256 if (cfg.shortcuts[sc].keyCode == keyCode && cfg.shortcuts[sc].modifiers == modifiers)
257 {
258 ShortcutManager::execute(sc);
259 return true;
260 }
261
262 return false;
263 }
264
265 // 0x004BEC5B
266 void processKeyboardInput()

Callers 1

normalKeyFunction · 0.85

Calls 2

executeFunction · 0.85
getFunction · 0.50

Tested by

no test coverage detected