diff options
author | Robin Gareus <robin@gareus.org> | 2019-12-16 15:02:39 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-12-16 15:02:39 +0100 |
commit | 322e6e08c436d98402c430fff7af5196137fe292 (patch) | |
tree | f44f55f85a44424b29099fb0b0fad85d4346748c /gtk2_ardour/virtual_keyboard_window.h | |
parent | 2add7302637ba645e946ee127fe87c929b84212e (diff) |
Vkeybd: grab all key-events and use timer instead of key-repeat
This fixes an issue with arrow-keys (up/down, left/right). Those
were previously only handled when the Virtual Keyboard window itself
had focus.
Also key-repeat for pitch-bend is now ignored and a dedicated timer
is used to queue events. This fixes an issue with the first repeat
taking longer than successive ones, and makes this feature independent
of any desktop user settings.
Diffstat (limited to 'gtk2_ardour/virtual_keyboard_window.h')
-rw-r--r-- | gtk2_ardour/virtual_keyboard_window.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk2_ardour/virtual_keyboard_window.h b/gtk2_ardour/virtual_keyboard_window.h index 3ee663b102..0db53472f2 100644 --- a/gtk2_ardour/virtual_keyboard_window.h +++ b/gtk2_ardour/virtual_keyboard_window.h @@ -104,6 +104,10 @@ private: void note_off_event_handler (int); void control_change_event_handler (int, int); + void octave_key_event_handler (bool); + void pitch_bend_key_event_handler (int, bool); + bool pitch_bend_timeout (); + void pitch_bend_event_handler (int); void pitch_bend_release (); void pitch_bend_update_tooltip (int); @@ -158,6 +162,9 @@ private: ArdourWidgets::ArdourDropdown _cc_key[VKBD_NCTRLS]; PBD::ScopedConnectionList _cc_connections; + + sigc::connection _bender_connection; + int _pitch_bend_target; }; #endif |