mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-31 15:47:26 +00:00
In the virtual keyboard example, simulate not only key press but also release
This commit is contained in:
parent
4d502a9f96
commit
f57bab3650
2 changed files with 8 additions and 3 deletions
|
@ -5,8 +5,10 @@
|
|||
|
||||
void init_virtual_keyboard(slint::ComponentHandle<MainWindow> app)
|
||||
{
|
||||
app->global<VirtualKeyboardHandler>().on_key_pressed(
|
||||
[=](auto key) { app->window().dispatch_key_press_event(key); });
|
||||
app->global<VirtualKeyboardHandler>().on_key_pressed([=](auto key) {
|
||||
app->window().dispatch_key_press_event(key);
|
||||
app->window().dispatch_key_release_event(key);
|
||||
});
|
||||
}
|
||||
|
||||
int main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue