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/pianokeyboard.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/pianokeyboard.h')
-rw-r--r-- | gtk2_ardour/pianokeyboard.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk2_ardour/pianokeyboard.h b/gtk2_ardour/pianokeyboard.h index 2b12befe73..042afcd283 100644 --- a/gtk2_ardour/pianokeyboard.h +++ b/gtk2_ardour/pianokeyboard.h @@ -31,10 +31,12 @@ public: APianoKeyboard (); ~APianoKeyboard (); - sigc::signal<void, int, int> NoteOn; - sigc::signal<void, int> NoteOff; - sigc::signal<void> Rest; - sigc::signal<void,bool> SustainChanged; + sigc::signal<void, int, int> NoteOn; + sigc::signal<void, int> NoteOff; + sigc::signal<void> Rest; + sigc::signal<void,bool> SustainChanged; + sigc::signal<void, int, bool> PitchBend; + sigc::signal<void, bool> SwitchOctave; enum Layout { QWERTY, @@ -79,6 +81,8 @@ private: void queue_note_draw (int note); + bool handle_fixed_keys (GdkEventKey*); + void press_key (int key, int vel); void release_key (int key); void stop_sustained_notes (); |