summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-14 01:09:51 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-14 01:09:51 +0300
commitc08e3796fca9a682577b5848b253100883328cef (patch)
tree016161e9e25b5c377830775df91da58bf4e28b88
parentc9cd2ebf0e5ecf65bc3a7f00760a800edc79e933 (diff)
downloadmv-c08e3796fca9a682577b5848b253100883328cef.tar.gz
mv-c08e3796fca9a682577b5848b253100883328cef.tar.bz2
mv-c08e3796fca9a682577b5848b253100883328cef.tar.xz
mv-c08e3796fca9a682577b5848b253100883328cef.zip
Extend logging SDL_KEYDOWN/SDL_KEYUP events in SDL 2.
-rw-r--r--src/eventsmanager.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp
index f557e8932..ddefbddbc 100644
--- a/src/eventsmanager.cpp
+++ b/src/eventsmanager.cpp
@@ -292,18 +292,24 @@ void EventsManager::logEvent(const SDL_Event &event)
break;
}
case SDL_KEYDOWN:
- logger->log("event: SDL_KEYDOWN: %s(%d) %d,%d",
+ logger->log("event: SDL_KEYDOWN: %s(%d) %s(%d) %d,%d,%u",
SDL_GetScancodeName(event.key.keysym.scancode),
+ event.key.keysym.scancode,
+ SDL_GetKeyName(event.key.keysym.sym),
+ event.key.keysym.sym,
event.key.state,
event.key.repeat,
- event.key.keysym.scancode);
+ CAST_U32(event.key.keysym.mod));
break;
case SDL_KEYUP:
- logger->log("event: SDL_KEYUP: %s(%d) %d,%d",
+ logger->log("event: SDL_KEYUP: %s(%d) %s(%d) %d,%d,%u",
SDL_GetScancodeName(event.key.keysym.scancode),
+ event.key.keysym.scancode,
+ SDL_GetKeyName(event.key.keysym.sym),
+ event.key.keysym.sym,
event.key.state,
event.key.repeat,
- event.key.keysym.scancode);
+ CAST_U32(event.key.keysym.mod));
break;
case SDL_WINDOWEVENT:
{