robbert-vdh / nih-plug

Rust VST3 and CLAP plugin framework and plugins - because everything is better when you do it yourself
ISC License
1.61k stars 143 forks source link

Keyboard Input broken on Windows 10 (nih-plug-egui) #154

Open nat3Github opened 2 months ago

nat3Github commented 2 months ago

Keyboard Input doesnt work in windows 10. (probably never has) tested with windows 10, newest nihplug, standalone, and nihplug-egui.

probably doesnt work with any editor because the issue comes from baseview. here is the baseview issue https://github.com/RustAudio/baseview/issues/192

nat3Github commented 2 months ago

apparently this is due to the parented window (where the plug-in editor lives) not beeing focused in windows.

so this is less the responsibility of baseview/nih-plug and more of baseview-egui/nih-plug-egui.

calling the focus() method on the parented window handle (in baseview-egui) fixes this behavior (as pointed out by DRACONIUM https://discord.com/channels/590254806208217089/630166269169238026/1248114299189067889).

i guess at least in standalone the parented window should always be focused because there is no other window there.