summaryrefslogtreecommitdiff
path: root/gtk2_ardour/crossfade_edit.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-11-09 08:22:48 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-11-09 08:22:48 +0000
commite4c30241e8ed4ba79c37f568ca683be7644f52a8 (patch)
tree8f65c10c102af9becd56a41d36ede1f211a87585 /gtk2_ardour/crossfade_edit.cc
parent09dd88c0e56d4411db164c207995db4692a51659 (diff)
a few useful keybindings in the xfade editor
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4116 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/crossfade_edit.cc')
-rw-r--r--gtk2_ardour/crossfade_edit.cc45
1 files changed, 45 insertions, 0 deletions
diff --git a/gtk2_ardour/crossfade_edit.cc b/gtk2_ardour/crossfade_edit.cc
index c5d7b72db4..b47247c68d 100644
--- a/gtk2_ardour/crossfade_edit.cc
+++ b/gtk2_ardour/crossfade_edit.cc
@@ -1338,3 +1338,48 @@ CrossfadeEditor::audition_left_dry_toggled ()
}
}
}
+
+bool
+CrossfadeEditor::on_key_press_event (GdkEventKey *ev)
+{
+ return true;
+}
+
+bool
+CrossfadeEditor::on_key_release_event (GdkEventKey* ev)
+{
+ switch (ev->keyval) {
+ case GDK_Right:
+ if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
+ audition_right_dry_button.set_active (!audition_right_dry_button.get_active());
+ } else {
+ audition_right_button.set_active (!audition_right_button.get_active());
+ }
+ break;
+
+ case GDK_Left:
+ if (Keyboard::modifier_state_equals (ev->state, Keyboard::PrimaryModifier)) {
+ audition_left_dry_button.set_active (!audition_left_dry_button.get_active());
+ } else {
+ audition_left_button.set_active (!audition_left_button.get_active());
+ }
+ break;
+
+ case GDK_space:
+ if (audition_left_dry_button.get_active() ||
+ audition_left_button.get_active () ||
+ audition_right_dry_button.get_active () ||
+ audition_right_button.get_active () ||
+ audition_both_button.get_active ()) {
+ cancel_audition ();
+ } else {
+ audition_both_button.set_active (!audition_both_button.get_active());
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return true;
+}