The `xdg` module got renamed to `xdg_base_dirs`. However, Ubuntu still
ships the `python3-xdg` package with the old module, so we'll have to
support both so that it'll work with both Ubuntu packages and in a
virtual environment.
Turns out that Keyman 18 already compiles with ICU 76, so the only thing
left to do is mark the Debian bug as being closed by this change.
Fixes: #12920
This change contains various changes and refactorings which together
allows the integration tests to pass again.
One of the important changs is `DbusTestHelper` which listens to a DBus
signal for a sentinel message and then simulates the sentinel key press.
Getting this to work also requires processing sd-bus messages which hooks
into the glib event loop and is implemented in `EventSource`.
Fixes: #13204
When running tests we use the `OrderedOutputDeviceMock` class which sends a
dbus message for a sentinel key press instead of creating/using a real
"virtual" keyboard.
This change fixes#13171 where we failed to output after the first keypress
because the keyman system service had to be started. This change introduces
a new method `Ping` that we call to force keyman-system-service to be
started.
Fixes: #13171
The setup for the integration tests is still wrong, so ignoring them
allows us to start the users tests and move forward. The integration
tests will be fixed in a follow-up commit.
This change allows to press F24 as ordered output sentinel from
keyman-system-service.
This is part of implementing serialized output with keyman-system-service
instead of requiring a patched ibus.
The problem both approaches try to solve is that with non-compliant apps
it is not possible to directly delete characters from the context. Instead
we have to emit a backspace key before we can commit the new
characters. However, the backspace key press goes through a different
code path in ibus and so it can happen that the commit gets processed
before the backspace which then deletes from the characters we just
added instead of from the old content.
The previous implementation solved this by forwarding a F24 ordered output
sentinel key to ibus and relying on the patched ibus to send that back to
us. When we received the F24 key we committed the characters that we
queued when we forwarded the F24 key (implemented in #7079).
The new approach implemented in this change instead sends the F24 ordered
output sentinel key through keyman-system-service and so follows the
regular key processing without requiring a patched ibus to send the key
back to us. The rest of the algorithm stays mostly the same: when we receive
the F24 key we commit the characters previously queued. The difference to
the previous implementation is that we now also queue the backspace keys
that we generate.
Part-of: #10799