diff options
Diffstat (limited to 'src/libs/gui/PatchWindow.cpp')
-rw-r--r-- | src/libs/gui/PatchWindow.cpp | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/src/libs/gui/PatchWindow.cpp b/src/libs/gui/PatchWindow.cpp index 84c60fc9..865cc9eb 100644 --- a/src/libs/gui/PatchWindow.cpp +++ b/src/libs/gui/PatchWindow.cpp @@ -419,17 +419,31 @@ PatchWindow::on_hide() bool PatchWindow::on_key_press_event(GdkEventKey* event) { - if (event->keyval == GDK_Delete) { - if (_view) { - _view->canvas()->destroy_selection(); - } - return true; - } else { - return Gtk::Window::on_key_press_event(event); - } + bool ret = false; + + ret = _view->canvas()->canvas_key_event(event); + + if (!ret) + ret = Gtk::Window::on_key_press_event(event); + + return ret; } + +bool +PatchWindow::on_key_release_event(GdkEventKey* event) +{ + bool ret = false; + + ret = _view->canvas()->canvas_key_event(event); + + if (!ret) + ret = Gtk::Window::on_key_release_event(event); + + return ret; +} + void PatchWindow::event_quit() { |