Skip to content

Commit

Permalink
[KeyboardHandler] Lua-defined keys can now be remapped on first run.
Browse files Browse the repository at this point in the history
  • Loading branch information
Unarelith committed Jul 17, 2020
1 parent 072c3b2 commit a0c0491
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/client/core/KeyboardHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a0c0491

Please sign in to comment.