diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-12-21 16:00:32 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-12-21 16:00:32 +0000 |
commit | 146e5baec26ad659f7f84f648fcdd7b876d138bb (patch) | |
tree | 964dc60e96cb349c2c766b6183b6fc9c74ac24cd /gtk2_ardour/utils.cc | |
parent | 2315c433e276110d8c1ac7cc5c8935c31b6f5879 (diff) |
fix up nudge for marker motion; make keyboard handling do the right thing when numlock is pressed and an un-modified key press event occurs
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2807 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/utils.cc')
-rw-r--r-- | gtk2_ardour/utils.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index 8a9325a940..991f31b74d 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -403,7 +403,7 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev) GtkWidget* focus = gtk_window_get_focus (win); bool special_handling_of_unmodified_accelerators = false; -#undef DEBUG_ACCELERATOR_HANDLING +#undef DEBUG_ACCELERATOR_HANDLING #ifdef DEBUG_ACCELERATOR_HANDLING bool debug = (getenv ("ARDOUR_DEBUG_ACCELERATOR_HANDLING") != 0); #endif @@ -488,12 +488,11 @@ key_press_focus_accelerator_handler (Gtk::Window& window, GdkEventKey* ev) } } - if (!special_handling_of_unmodified_accelerators || - ev->state & (Gdk::MOD1_MASK| - Gdk::MOD3_MASK| - Gdk::MOD4_MASK| - Gdk::MOD5_MASK| - Gdk::CONTROL_MASK)) { + /* consider all relevant modifiers but not LOCK or SHIFT */ + + guint mask = (Keyboard::RelevantModifierKeyMask & ~(Gdk::SHIFT_MASK|Gdk::LOCK_MASK)); + + if (!special_handling_of_unmodified_accelerators || (ev->state & mask)) { /* no special handling or there are modifiers in effect: accelerate first */ |