Browse Source

Don't consume key in TextField is Ctrl is held.

tags/v2.1.0
Andrew Belt 2 years ago
parent
commit
6258edeaf4
2 changed files with 4 additions and 4 deletions
  1. +1
    -1
      src/app/Scene.cpp
  2. +3
    -3
      src/ui/TextField.cpp

+ 1
- 1
src/app/Scene.cpp View File

@@ -326,7 +326,7 @@ void Scene::onHoverKey(const HoverKeyEvent& e) {

// Key commands that can be overridden by children
if (e.action == GLFW_PRESS || e.action == GLFW_REPEAT) {
// Alternate key command for exiting fullscreen, since F11 doesn't work reliably on Mac due to "Show desktop" OS binding.
// Alternative key command for exiting fullscreen, since F11 doesn't work reliably on Mac due to "Show desktop" OS binding.
if (e.key == GLFW_KEY_ESCAPE && (e.mods & RACK_MOD_MASK) == 0) {
if (APP->window->isFullScreen()) {
APP->window->setFullScreen(false);


+ 3
- 3
src/ui/TextField.cpp View File

@@ -242,14 +242,14 @@ void TextField::onSelectKey(const SelectKeyEvent& e) {
APP->event->setSelectedWidget(nextField);
e.consume(this);
}
// Shift-Tab
// Shift+Tab
if (e.key == GLFW_KEY_TAB && (e.mods & RACK_MOD_MASK) == GLFW_MOD_SHIFT) {
if (prevField)
APP->event->setSelectedWidget(prevField);
e.consume(this);
}
// Consume all printable keys
if (e.keyName != "") {
// Consume all printable keys unless Ctrl is held
if ((e.mods & RACK_MOD_CTRL) == 0 && e.keyName != "") {
e.consume(this);
}



Loading…
Cancel
Save