|
|
@@ -250,6 +250,7 @@ std::string GtkEditor::get_lumacs_key_name(guint keyval, Gdk::ModifierType state
|
|
|
|
|
|
bool GtkEditor::on_global_key_pressed(guint keyval, guint keycode, Gdk::ModifierType state) {
|
|
|
(void)keycode;
|
|
|
+ spdlog::debug("GtkEditor::on_global_key_pressed: keyval={}, state={}", keyval, (int)state);
|
|
|
if (!core_) return false;
|
|
|
|
|
|
// Translate GDK event to Lumacs key name
|
|
|
@@ -392,8 +393,9 @@ void GtkEditor::on_activate() {
|
|
|
|
|
|
// Attach global key controller to the main window
|
|
|
auto global_key_controller = Gtk::EventControllerKey::create();
|
|
|
+ global_key_controller->set_propagation_phase(Gtk::PropagationPhase::CAPTURE);
|
|
|
global_key_controller->signal_key_pressed().connect(
|
|
|
- sigc::mem_fun(*this, &GtkEditor::on_global_key_pressed), true // Consume events handled by us
|
|
|
+ sigc::mem_fun(*this, &GtkEditor::on_global_key_pressed), false
|
|
|
);
|
|
|
window_->add_controller(global_key_controller);
|
|
|
}
|