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

Method listAllKeybinds

library/modules/Hotkey.cpp:293–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293std::vector<KeyBinding> HotkeyManager::listAllKeybinds() {
294 std::lock_guard<std::mutex> l(lock);
295 std::vector<KeyBinding> out;
296
297 for (const auto& [_, bind_set] : bindings) {
298 for (const auto& bind : bind_set) {
299 out.emplace_back(bind);
300 }
301 }
302 return out;
303}
304
305bool HotkeyManager::handleKeybind(int sym, int modifiers) {
306 // Ensure gamestate is ready

Callers 1

hotkey_listAllKeybindsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected