Vkeybd: force release notes on panic

If key(s) are still being pressed, a key-repeat will re-trigger
the most recently pressed note (depending on keyboard settings).
This commit is contained in:
Robin Gareus 2019-12-26 12:17:20 +01:00
parent b228dce1c1
commit b942eecc9c
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
3 changed files with 9 additions and 0 deletions

View file

@ -398,6 +398,7 @@ VirtualKeyboardWindow::update_octave_range ()
bool
VirtualKeyboardWindow::send_panic_message (GdkEventButton*)
{
_piano.reset ();
uint8_t channel = PBD::atoi (_midi_channel.get_text ()) - 1;
uint8_t ev[3];
ev[0] = MIDI_CMD_CONTROL | channel;