diff --git a/src/Configuration.cpp b/src/Configuration.cpp index f117cf4..07c6bd6 100644 --- a/src/Configuration.cpp +++ b/src/Configuration.cpp @@ -31,11 +31,11 @@ void Configuration::set_defaults() {"reset", {"CTRL", "r"}} }; config["input"] = { - {"suppress-any-key-on-mods", true}, - {"system-any-key-ignore-commands", {"fullscreen", "screenshot", "record", "quit"}}, - {"any-key-ignore-commands", nlohmann::json::array()}, + {"suppress any key on mods", true}, + {"system any key ignore commands", {"fullscreen", "screenshot", "record", "quit"}}, + {"any key ignore commands", nlohmann::json::array()}, {"default-unsuppress-delay", 0.7}, - {"ignore-repeat-keypress", true} + {"ignore repeat keypress", true} }; config["display"] = { {"dimensions", {960, 540}}, diff --git a/src/Configuration.hpp b/src/Configuration.hpp index f57d95c..e4cb102 100644 --- a/src/Configuration.hpp +++ b/src/Configuration.hpp @@ -103,7 +103,7 @@ public: * https://nlohmann.github.io/json/api/basic_json/ for further information on how to read and write the JSON object. * * @param key Top level key corresponding to a section of the SPACEBOX configuration JSON - * @return + * @return writable nlohmann::JSON object reference */ nlohmann::json& operator[](const std::string& key); diff --git a/src/Input.cpp b/src/Input.cpp index e6173cc..7fb65d0 100644 --- a/src/Input.cpp +++ b/src/Input.cpp @@ -104,10 +104,10 @@ void Input::respond(SDL_Event &event) SDL_Keycode sym = event.key.keysym.sym; bool found_command = false, cancel = event.type != SDL_KEYDOWN, ctrl = mod & KMOD_CTRL, shift = mod & KMOD_SHIFT, alt = mod & KMOD_ALT, - suppress_any_key = configuration()["input"]["suppress-any-key-on-mods"] && (ctrl || alt); - const std::vector& system_any_key_ignore = configuration()["input"]["system-any-key-ignore-commands"]; - const std::vector& any_key_ignore = configuration()["input"]["any-key-ignore-commands"]; - bool ignore_repeat = configuration()["input"]["ignore-repeat-keypress"]; + suppress_any_key = configuration()["input"]["suppress any key on mods"] && (ctrl || alt); + const std::vector& system_any_key_ignore = configuration()["input"]["system any key ignore commands"]; + const std::vector& any_key_ignore = configuration()["input"]["any key ignore commands"]; + bool ignore_repeat = configuration()["input"]["ignore repeat keypress"]; if (event.key.repeat == 0 || !ignore_repeat) { for (KeyCombination& combination : key_map)