I’m not sure how this is happening, but inside Cubase, if I press the return key my buttonClicked() function is called. Never noticed that before. It happens whether I have PluginWantsKeyFocus checked or not.
If you use the GUI without a mouse, it is normal behaviour to step the focus through the components via tab key. If the button has the keyboard focus, an enter key event would be considered a buttonClicked().
Otherwise there would be no way to use a GUI without a mouse/pointing device.
This behaviour is found in most GUI-s including browser websites etc.
Also for accessibility I think this is important to allow at least one alternative to using the mouse.
I had a user report that when he pressed Return/Enter for a specific key command on Cubase, my plugin responded as if a random button had been pushed…basically calling buttonClicked(). I tried changing the PluginWantsKeyFocus and it still responded the same way.
i’m a heavy cubase user but i can’t recall enter being a button that i use a lot of times… not even sure if i ever use it for anything. but i guess some people like to use more key commands than me… also i think a plugin should try to have as less key commands as possible so that situations like this become clearer. imagine a plugin that utilizes the space key outside of a textbox for example. a problem with enter is more of an edge case imo