Browse Source

Add Escape as alternate key command to exit fullscreen, in case F11 doesn't work or the user doesn't know to press F11.

tags/v2.0.0
Andrew Belt 4 years ago
parent
commit
aa1c8a3cb2
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/app/Scene.cpp

+ 6
- 0
src/app/Scene.cpp View File

@@ -168,6 +168,12 @@ void Scene::onHoverKey(const event::HoverKey& e) {
APP->window->setFullScreen(!APP->window->isFullScreen());
e.consume(this);
}
// Alternate key command for exiting fullscreen, since F11 doesn't work reliably on Mac due to "Show desktop" OS binding.
else if (e.key == GLFW_KEY_ESCAPE && (e.mods & RACK_MOD_MASK) == 0) {
if (APP->window->isFullScreen())
APP->window->setFullScreen(false);
e.consume(this);
}
}
}



Loading…
Cancel
Save