MCPcopy Create free account
hub / github.com/Segs/Segs / setKeybind

Method setKeybind

Projects/CoX/Common/GameData/keybind_definitions.cpp:66–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void KeybindSettings::setKeybind(QString &profile, KeyName &key, ModKeys &mods, QString &command, bool &is_secondary)
67{
68 removeKeybind(profile,key,mods); // remove previous keybinds
69
70 QString keystring = makeKeyString(key,mods); // Construct keystring from mods+key
71
72 for(auto &p : m_keybind_profiles)
73 {
74 if(p.Name == profile)
75 p.KeybindArr.push_back({key,mods,keystring.toLatin1(),command.toLatin1(),is_secondary});
76 }
77
78 qCDebug(logKeybinds) << "Setting keybind: " << profile << key << mods << keystring << command << is_secondary;
79
80}
81
82void KeybindSettings::removeKeybind(QString &profile, KeyName &key, ModKeys &mods)
83{

Callers 1

on_set_keybindMethod · 0.80

Calls 2

makeKeyStringFunction · 0.85
push_backMethod · 0.80

Tested by

no test coverage detected