diff --git a/src/Magnum/Platform/Test/GlfwApplicationTest.cpp b/src/Magnum/Platform/Test/GlfwApplicationTest.cpp index 884606d81..ad9c6311f 100644 --- a/src/Magnum/Platform/Test/GlfwApplicationTest.cpp +++ b/src/Magnum/Platform/Test/GlfwApplicationTest.cpp @@ -64,6 +64,9 @@ struct GlfwApplicationTest: Platform::Application { } else if(event.key() == KeyEvent::Key::H) { Debug{} << "toggling hand cursor"; setCursor(cursor() == Cursor::Arrow ? Cursor::Hand : Cursor::Arrow); + } else if(event.key() == KeyEvent::Key::L) { + Debug{} << "toggling locked mouse"; + setCursor(cursor() == Cursor::Arrow ? Cursor::HiddenLocked : Cursor::Arrow); } } diff --git a/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp b/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp index 261336458..4c9229bce 100644 --- a/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp +++ b/src/Magnum/Platform/Test/Sdl2ApplicationTest.cpp @@ -90,7 +90,12 @@ struct Sdl2ApplicationTest: Platform::Application { Debug{} << "toggling hand cursor"; setCursor(cursor() == Cursor::Arrow ? Cursor::Hand : Cursor::Arrow); } - #ifdef CORRADE_TARGET_EMSCRIPTEN + #ifndef CORRADE_TARGET_EMSCRIPTEN + else if(event.key() == KeyEvent::Key::L) { + Debug{} << "toggling locked mouse"; + setCursor(cursor() == Cursor::Arrow ? Cursor::HiddenLocked : Cursor::Arrow); + } + #else else if(event.key() == KeyEvent::Key::F) { Debug{} << "toggling fullscreen"; setContainerCssClass((_fullscreen ^= true) ? "fullsize" : "");