-
Hello, On our embedded platform we have a virtual keyboard running as a background app that can popup whenever an app needs a text input. By looking at the software keyboard example, it's clear that the software keyboard is implemented as a component that gets showed conditionally depending on the
This way we'll be able to use our system's API to show/hide the popup keyboard, which is a separately running app. Best, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hello, unfortunately there is callback right now for the window.global::<TextInputInterface>.on_text_input_focus_changed(|| {
// call my logic
}); @ogoffart what do you think? |
Beta Was this translation helpful? Give feedback.
-
Out of curiosity, what backed are you using? |
Beta Was this translation helpful? Give feedback.
-
Out of curiosity, what backed are you using?
We do send event in the Qt and winit backend for the IME things, and it should then propagated to the platform, maybe there is a way to hook into that?
Hi @ogoffart, it’s an embedded platform and we use a software backend for now. It’s a `MinimalSoftwareWindow` IIRC. And both `input_method_request` and `handle_focus_change` are hidden behind a private trait `WindowAdapterInternal` so we can't reimplement them. The best option would be to have a callback in `TextInputInterface` component proposed by @FloVanGH and it might require an internal change of hooking it up from within the `WindowAdapterInternal` that's available from inside `slint`.
|
Beta Was this translation helpful? Give feedback.
The reason I asked is because I think it might be the main use case that it is used by the platform implementers. I think the callback should be exposed in the WindowAdapter for the platform implementer. It is not part of our public API right now, but it should be polished and put there.
But then there should also be API in MinimalSoftwareWindow, i guess since that it what you are using.
Otherwise you can query the value of text-input-focused in your event loop.