-
-
Notifications
You must be signed in to change notification settings - Fork 618
Description
Bug Description
As the title says, Paste Method > Direct does not use the correct keyboard layout.
To test Handy, I said "Eins, zwei, drei" ("One, two, three" in German).
The History shows "Eins, zwei, drei" and if I switch Paste Method to Clipboard, "Eins, zwei, drei" is pasted.
Paste Method > Direct results in "Eins, ywei, drei." ("zwei" vs. "ywei").
The characters 'z' and 'y' are switched on the QWERTY (e.g., US) and QWERTZ (e.g., Germany) keyboard layouts, therefore I guess Paste Method > Direct does not use the correct keyboard layout.
All users that don't use QWERTY probably will have this issue.
I asked Gemini how to fix the issue, and it gave me the following:
This is likely a "Scancode vs. Unicode" issue in the Rust backend. The application appears to be simulating key presses based on physical US key locations (Scancodes) rather than sending the actual characters.
The Fix:
In the Rust code handling the "Direct" paste method (likely using the enigo crate), switch from simulating individual keys to using the text injection method.
If using enigo, change the implementation to use .text():
// ❌ Likely current implementation (maps to physical keys on US layout):
// enigo.key_click(Key::Layout('z'));
// ✅ Proposed fix (sends the string as Unicode, respecting layout):
enigo.text(transcribed_text);System Information
App Version:
v0.6.6
Operating System:
Arch Linux (rolling release, no version)
CPU:
Not relevant, I believe.
GPU:
Not relevant, I believe.