[KeyboardHandler] Lua-defined keys can now be remapped on first run.

This commit is contained in:
Quentin Bazin 2020-07-17 21:31:11 +02:00
parent 072c3b2942
commit a0c0491512

View File

@ -117,6 +117,11 @@ void KeyboardHandler::addKey(gk::GameKey id, const std::string &name, SDL_Keycod
it.first->second.setKeycode(defaultKey);
m_keysID.emplace(it.first->second.stringID(), id);
if (key) {
key->setKeycode(it.first->second.keycode());
it.first->second.setParent(key);
}
}
else {
Key &keyitem = m_keys.at(keyit->second);