Browse Source

Platform: show the value of KeyEvent::key() in the tests.

pull/338/head
Vladimír Vondruš 7 years ago
parent
commit
7e06581758
  1. 2
      src/Magnum/Platform/Test/GlfwApplicationTest.cpp
  2. 2
      src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp

2
src/Magnum/Platform/Test/GlfwApplicationTest.cpp

@ -43,7 +43,7 @@ struct GlfwApplicationTest: Platform::Application {
void keyPressEvent(KeyEvent& event) override {
#if GLFW_VERSION_MAJOR*100 + GLFW_VERSION_MINOR >= 302
Debug{} << "key press event:" << event.keyName();
Debug{} << "key press event:" << int(event.key()) << event.keyName();
#endif
if(event.key() == KeyEvent::Key::F1) {

2
src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp

@ -57,7 +57,7 @@ struct Sdl2ApplicationTest: Platform::Application {
}
void keyPressEvent(KeyEvent& event) override {
Debug{} << "key press event:" << event.keyName();
Debug{} << "key press event:" << SDL_Keycode(event.key()) << event.keyName();
if(event.key() == KeyEvent::Key::F1) {
Debug{} << "starting text input";

Loading…
Cancel
Save