Bug 146889 - LibreOffice 7.2.3.2 on Ubuntu 21.10 does Not Accept xdotool input
Summary: LibreOffice 7.2.3.2 on Ubuntu 21.10 does Not Accept xdotool input
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-20 23:40 UTC by Joseph Morris
Modified: 2022-01-21 09:43 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Morris 2022-01-20 23:40:43 UTC
Description:
If I type 

sleep 3 && xdotool type "Hello World"

and then switch to most text-editable windows (tested: Thunderbird, Chrome, RDPWindows / MSWord), then Hello World is typed. But not LibreOffice Writer or Calc (have not tested other LO components). 

Steps to Reproduce:
1. enter sleep 3 && xdotool type "Hello World" into a console
2. Switch to Writer within three seconds
3. See nothing happen
4. Try steps 1-3 with any other text-editable field/window

Actual Results:
Nothing

Expected Results:
"Hello World" typed in


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
This impairs nerd-dictation (Vosk voice-to-text) functionality, see 

https://github.com/ideasman42/nerd-dictation/issues/37

The nerd-dictation dev tested this and could not reproduce on libreoffice-fresh-7.2 on Arch. 

This was not always broken for me -- I know I used nerd-dictation in the past in Writer. It seemed to break in the update from Ubuntu 18 to 21.10, which include a change from X to Wayland, so perhaps related. But still, it's something at least partly specific to Writer/LO because xdotool can type to other windows just fine. 

****

Version: 7.2.3.2 / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 4; OS: Linux 5.13; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 1:7.2.3-0ubuntu0.21.10.1
Calc: threaded
Comment 1 Buovjaga 2022-01-21 09:43:28 UTC
Looking at xdotool releases, it turns out that it is allowed under XWayland, so I guess that is why you see it working for some application windows: https://github.com/jordansissel/xdotool/releases/tag/v3.20210903.1

However, LibreOffice runs as a native Wayland application with the gtk3 UI and this is why xdotool does not work.

nerd-dictation could try these alternatives:
https://github.com/ReimuNotMoe/ydotool
https://github.com/atx/wtype