Fix VST2 enter/return ambiguity -- thanks to falktx

This commit is contained in:
Robin Gareus 2021-05-18 01:21:08 +02:00
parent f9557d0d04
commit c9bc0ff578
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -176,7 +176,9 @@ VSTPluginUI::dispatch_effeditkey (GdkEventKey* gdk_key)
return false;
}
/* see https://github.com/DISTRHO/DPF/blob/master/distrho/src/DistrhoPluginVST.cpp */
/* see https://github.com/DISTRHO/DPF/blob/master/distrho/src/DistrhoPluginVST.cpp
* and https://github.com/steinbergmedia/vstgui/blob/develop/vstgui/lib/vstkeycode.h#L19
*/
int special_key = 0;
int ascii_key = 0;
@ -189,9 +191,11 @@ VSTPluginUI::dispatch_effeditkey (GdkEventKey* gdk_key)
special_key = 2;
break;
case GDK_Return:
case GDK_KP_Enter:
special_key = 4;
break;
case GDK_KP_Enter:
special_key = 19;
break;
case GDK_Escape:
special_key = 6;
break;