Skip to content

[BUG] Layout-dependent garbling #657

Description

@hopsayer

Summary

On 0.15.0 (AppImage), Wayland text injection into GNOME sometimes types
text in the wrong keyboard layout, depending on which layout is currently
active. Did not happen on 0.14.x (AUR package).

Steps to Reproduce

  1. Set active keyboard layout to English
  2. Dictate a Russian phrase, e.g. "Где-то в парке поют птицы и я их слышу"
  3. Observe the injected text is garbled — typed as if through the wrong layout
  4. Switch active layout to Russian, dictate an English phrase — same problem in reverse

Expected Behavior

Injected text matches the dictated language regardless of the currently
active keyboard layout.

Actual Behavior

Text is injected as if xdotool pressed the physical keys that would produce
the dictated text on the wrong layout — not the actual Unicode characters.

Sample (layout = English, said the Russian phrase above):

[08:41:43.420] INFO  vocalinux.text_injection.text_injector | Starting text injection: 'Где-то в парке поют птицы и я их слышу ' (length: 40)
[08:41:43.428] INFO  vocalinux.text_injection.text_injector | Target window: 'Telegram' (ID: 27262988)
[08:41:43.434] INFO  vocalinux.text_injection.text_injector | Target process: Telegram (PID: 4555)
[08:41:43.434] INFO  vocalinux.text_injection.text_injector | Checking for better Wayland text injection tools...
[08:41:44.614] INFO  vocalinux.text_injection.text_injector | Text injected using xdotool: 'Где-то в парке поют ...' (40 chars)
[08:41:44.719] INFO  vocalinux.text_injection.text_injector | Text injection completed successfully

Injected: U-

Same phrase, layout switched to Russian:

[08:43:24.914] INFO  vocalinux.text_injection.text_injector | Starting text injection: 'И где-то в парке поют птицы и я их слышу ' (length: 41)
[08:43:24.921] INFO  vocalinux.text_injection.text_injector | Target window: 'Telegram' (ID: 27262988)
[08:43:24.929] INFO  vocalinux.text_injection.text_injector | Target process: Telegram (PID: 4555)
[08:43:24.929] INFO  vocalinux.text_injection.text_injector | Checking for better Wayland text injection tools...
[08:43:26.232] INFO  vocalinux.text_injection.text_injector | Text injected using xdotool: 'И где-то в парке пою...' (41 chars)
[08:43:26.337] INFO  vocalinux.text_injection.text_injector | Text injection completed successfully

Injection: И -

Notes

Both logs show the app landing on the xdotool path, not IBus. xdotool
synthesizes keypresses based on the currently active layout, which matches
the symptom — it's pressing the physical keys that would produce this text
on the wrong layout, rather than committing actual Unicode. The IBus path
commits Unicode directly and shouldn't be layout-dependent, so this looks
like the app is falling back to xdotool/XWayland here instead of using IBus.
The desktop portal prompt
also looked different/simpler than on 0.14.x — possibly related to why the
IBus path isn't being used.

Environment

  • vocalinux 0.15.0, AppImage
  • GNOME on Wayland
  • Previously on 0.14.x (AUR package), where this was not observed

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions