summaryrefslogtreecommitdiff
path: root/src/gui/setup_keyboard.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-09 17:13:34 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-09 17:13:34 +0300
commite6bb33fad96878b66ecb32c104d06cd6e5ea9e77 (patch)
tree9294304f6480140a1cb0383df395893ae7009db7 /src/gui/setup_keyboard.cpp
parent443813146a327504a07a507f43117d92296ca8a7 (diff)
downloadplus-e6bb33fad96878b66ecb32c104d06cd6e5ea9e77.tar.gz
plus-e6bb33fad96878b66ecb32c104d06cd6e5ea9e77.tar.bz2
plus-e6bb33fad96878b66ecb32c104d06cd6e5ea9e77.tar.xz
plus-e6bb33fad96878b66ecb32c104d06cd6e5ea9e77.zip
Add limited support for keys unknown for SDL.
This keys can be assigned to simple actions and cant be modifier keys.
Diffstat (limited to 'src/gui/setup_keyboard.cpp')
-rw-r--r--src/gui/setup_keyboard.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/setup_keyboard.cpp b/src/gui/setup_keyboard.cpp
index aae1cd183..e9ce1b704 100644
--- a/src/gui/setup_keyboard.cpp
+++ b/src/gui/setup_keyboard.cpp
@@ -201,11 +201,9 @@ void Setup_Keyboard::refreshAssignedKey(int index)
}
else
{
- std::string caption;
- char *temp = SDL_GetKeyName(
- static_cast<SDLKey>(keyboard.getKeyValue(index)));
- caption = keyboard.getKeyCaption(index) + ": " + toString(temp);
- mKeyListModel->setElementAt(index, caption);
+ mKeyListModel->setElementAt(index, strprintf("%s: %s",
+ keyboard.getKeyCaption(index).c_str(),
+ keyboard.getKeyStringLong(index).c_str()));
}
}