From e6bb33fad96878b66ecb32c104d06cd6e5ea9e77 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 9 Mar 2012 17:13:34 +0300 Subject: Add limited support for keys unknown for SDL. This keys can be assigned to simple actions and cant be modifier keys. --- src/gui/setup_keyboard.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/gui/setup_keyboard.cpp') 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(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())); } } -- cgit v1.2.3-70-g09d2