| 21 | } |
| 22 | |
| 23 | static void readShortcutConfig(const YAML::Node& scNode) |
| 24 | { |
| 25 | const auto& shortcutDefs = Input::ShortcutManager::getList(); |
| 26 | auto& shortcuts = _config.shortcuts; |
| 27 | for (const auto& def : shortcutDefs) |
| 28 | { |
| 29 | auto node = scNode[def.configName]; |
| 30 | if (node) |
| 31 | { |
| 32 | shortcuts[def.id] = node.as<KeyboardShortcut>(); |
| 33 | } |
| 34 | else |
| 35 | { |
| 36 | shortcuts[def.id] = YAML::Node(def.defaultBinding).as<KeyboardShortcut>(); |
| 37 | } |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | Config& read() |
| 42 | { |