removed hyphens from keyboard input related configuration key names
This commit is contained in:
parent
9a6b80f443
commit
293d74e396
|
@ -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}},
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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<std::string>& system_any_key_ignore = configuration()["input"]["system-any-key-ignore-commands"];
|
||||
const std::vector<std::string>& 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<std::string>& system_any_key_ignore = configuration()["input"]["system any key ignore commands"];
|
||||
const std::vector<std::string>& 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)
|
||||
|
|
Loading…
Reference in New Issue