From cade0046bf2ef858ca5c53e163f1a2c1976629c8 Mon Sep 17 00:00:00 2001 From: eneller Date: Wed, 17 Dec 2025 20:18:51 +0100 Subject: [PATCH] doc: research --- README.md | 12 ++++++++++-- src-tauri/src/lib.rs | 3 +++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d3981bb..92f2fe8 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,16 @@ On Windows, Tauri requires the the msvc toolchain: rustup default stable-msvc ``` - - ## Recommended IDE Setup [VS Code](https://code.visualstudio.com/) + [Tauri](https://marketplace.visualstudio.com/items?itemName=tauri-apps.tauri-vscode) + [rust-analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) + [Angular Language Service](https://marketplace.visualstudio.com/items?itemName=Angular.ng-template). + +## Keyboard Emulation +Keyboard emulation on most systems requires workarounds for two issues: +- keeping the window with the keyboard on top while another (the input target) is in focus +- not receiving focus when clicked +- sending input +### Windows +To keep the window on top: [PowerToys Always on top](https://learn.microsoft.com/en-us/windows/powertoys/always-on-top). +To [send input](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput), inspired by [dpurgin/osk](https://github.com/dpurgin/osk). + diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index bb4c272..f55d203 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -53,6 +53,9 @@ pub fn run() { .setup(|app| { #[cfg_attr(not(target_os = "linux"), allow(unused_variables))] let window = app.get_webview_window("main").unwrap(); + #[cfg(target_os = "windows")] + { + } #[cfg(target_os = "linux")] { use x11::xlib;