Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed keypresses in plugin UI #191

Open
peastman opened this issue Dec 31, 2024 · 0 comments
Open

Missed keypresses in plugin UI #191

peastman opened this issue Dec 31, 2024 · 0 comments

Comments

@peastman
Copy link

I'm implementing the UI for my plugin with egui and testing it in Reaper on macOS. It includes a text field for the user to type into. It doesn't work correctly. When I try to type into it, Reaper intercepts the keystrokes and interprets them as commands instead of sending them to the text field.

I found reports of the same problem in other VSTs:

https://forums.steinberg.net/t/how-receive-computer-keyboard-keystrokes-in-vst3-plugins/700967

iPlug2/iPlug2#477

Based on those reports, I believe the problem is that NIH-plug doesn't implement on_key_down() and on_key_up():

unsafe fn on_key_down(
&self,
_key: vst3_sys::base::char16,
_key_code: i16,
_modifiers: i16,
) -> tresult {
kNotImplemented
}
unsafe fn on_key_up(
&self,
_key: vst3_sys::base::char16,
_key_code: i16,
_modifiers: i16,
) -> tresult {
kNotImplemented
}

Returning kNotImplemented tells the host that the plugin isn't interested in keypresses, and the host should interpret them itself.

The CLAP version of the plugin has the same problem. I assume it has a similar mechanism.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant