From ceee42f7af55eeb8e65caeee8495a38286b792f8 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 22 Nov 2019 22:11:55 +0100 Subject: Virtual MIDI keyboard, when visible, gets to handle keyboard input first --- gtk2_ardour/ardour_ui_keys.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gtk2_ardour/ardour_ui_keys.cc b/gtk2_ardour/ardour_ui_keys.cc index 17c3ebeb73..662eff5762 100644 --- a/gtk2_ardour/ardour_ui_keys.cc +++ b/gtk2_ardour/ardour_ui_keys.cc @@ -40,6 +40,7 @@ #include "debug.h" #include "keyboard.h" #include "public_editor.h" +#include "virtual_keyboard_window.h" using namespace ARDOUR; using namespace PBD; @@ -54,6 +55,12 @@ ARDOUR_UI::key_event_handler (GdkEventKey* ev, Gtk::Window* event_window) Gtkmm2ext::Bindings* bindings = 0; Gtk::Window* window = 0; + if (virtual_keyboard_window && virtual_keyboard_window->is_visible()) { + if (gtk_window_propagate_key_event (virtual_keyboard_window->gobj(), ev)) { + return true; + } + } + /* until we get ardour bindings working, we are not handling key * releases yet. */ -- cgit v1.2.3