diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index f165f00597..e7f29dfcde 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -37,6 +37,7 @@ #include #include +#include "gtkmm2ext/keyboard.h" #include "gtkmm2ext/utils.h" #include "gtkmm2ext/gtk_ui.h" #include "gtkmm2ext/window_title.h" @@ -4461,6 +4462,19 @@ These settings will only take effect after %1 is restarted.\n\ set_current_page (_("General")); } +bool +RCOptionEditor::on_key_release_event (GdkEventKey* event) +{ + if (Keyboard::modifier_state_equals (event->state, Keyboard::close_window_modifier)) { + if (event->keyval == Keyboard::close_window_key) { + WindowProxy::hide (); + return true; + } + } + + return false; +} + void RCOptionEditor::set_session (Session *s) { diff --git a/gtk2_ardour/rc_option_editor.h b/gtk2_ardour/rc_option_editor.h index e175cffea7..bac3d9ebea 100644 --- a/gtk2_ardour/rc_option_editor.h +++ b/gtk2_ardour/rc_option_editor.h @@ -46,6 +46,8 @@ public: Gtk::Window* use_own_window (bool and_fill_it); XMLNode& get_state (); + bool on_key_release_event (GdkEventKey*); + private: void parameter_changed (std::string const &); void ltc_generator_volume_changed ();