Skip to content

Keyboard input issues #219

@peastman

Description

@peastman

This is tangentially related to #191, but it's not the same problem, and the workaround for that issue doesn't fix it.

I have a plugin (Chorus Ex Machina) whose UI includes text fields to type into. It's a singing synthesizer, and the text fields are to enter the text for it to sing, so they're essential for the plugin to be usable.

In some DAWs, you can't type anything into them. The host intercepts all keyboard input and processes it itself rather than forwarding it to the plugin. This happens in Ableton and Reaper, and possibly in others I haven't tried.

There are workarounds, but they aren't very satisfactory. Reaper has an option you can enable, "Send all keyboard input to plug-in". That works, but only if users know it exists and know to activate it. And then it goes too far in the other direction. It sends all keypresses to the plugin all the time, even when a text field isn't active. You can no longer use any keyboard shortcuts for anything when the plugin UI is active. Ableton has a similar option, but it's even less convenient because it requires editing a text file by hand. And then it has the same problem of blocking all shortcuts.

I contacted tech support for Reaper, and they told me it automatically detects when a text field has focus and directs keypresses appropriately. The problem is that egui, VIZIA, and Iced all draw their own widgets rather than using ones provided by the OS. The host doesn't know a text field has focus because as far as the OS is concerned, it isn't a real text field. It's just a decoration being drawn to the screen that mimics one.

Is there any way to solve this? The most obvious solution would be to support a UI framework that uses native widgets. Possibly Dioxus or Tauri would work? Or is there some other way to signal the host so it knows which keypresses to delegate and which to process itself?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions