Keyboard input in the test suite is flaky on Wayland
The following discussion from !838 should be addressed: - [ ] @intrigeri started a [discussion](https://gitlab.tails.boum.org/tails/tails/-/merge_requests/838#note_197786): (+4 comments) > > * test suite does not find the DuckDuckGo search prompt, while it's visible on the failure screenshot # To Do * [x] Try migrating keyboard input to ponytail and see if it helps (on `feature/trixie` or in Tails 7.x) * Keep in mind we might have to revert this change if it does not actually fix this bug. # Call chain The code that's involved is: - our own `Screen#press` calls https://libvirt.org/ruby/api/Libvirt/Domain.html#method-i-send_key - https://libvirt.org/ruby/api/Libvirt/Domain.html#method-i-send_key [calls](https://sources.debian.org/src/ruby-libvirt/0.7.1-1.1/ext/libvirt/domain.c/?hl=2307#L2307) https://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainSendKey - https://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainSendKey [calls](https://sources.debian.org/src/libvirt/8.10.0-1/src/libvirt-domain.c/?hl=7336#L7336) `conn->driver->domainSendKey`, which in our case is [`qemuDomainSendKey`](https://sources.debian.org/src/libvirt/8.10.0-1/src/qemu/qemu_driver.c/?hl=2409#L2409) (https://sources.debian.org/src/libvirt/8.10.0-1/src/qemu/qemu_driver.c/?hl=20813#L20813) - `qemuDomainSendKey` → `qemuMonitorSendKey` → `qemuMonitorJSONSendKey`, which calls `qemuMonitorJSONMakeCommand` with the `send-key` argument, and passes its result to `qemuMonitorJSONCommand`; all this interacts with the "QEMU monitor console" - eventually we end up in [`hmp_sendkey`](https://sources.debian.org/src/qemu/1:7.1+dfsg-2/monitor/hmp-cmds.c/?hl=1664#L1664) → [`qmp_sendkey`](https://sources.debian.org/src/qemu/1:7.1+dfsg-2/ui/input-legacy.c/?hl=86#L86) → [`qemu_input_event_send_key_delay`](https://sources.debian.org/src/qemu/1:7.1+dfsg-2/ui/input.c/?hl=447#L447), which uses `kbd_default_delay_ms = 10` as the default hold time Note: the doc says the default hold time is 100 ms, which was indeed the case initially, but since https://salsa.debian.org/qemu-team/qemu/-/commit/2e377f1730d06deafb3e3ef6cf88792de4a6f4df it uses `kbd_default_delay_ms`, which has been 10 ms since [it was introduced](https://salsa.debian.org/qemu-team/qemu/-/commit/be1a7176249ddf0be179d79e4f9c86b2ad42997b) in 2014. # Failing test runs * https://jenkins.tails.boum.org/job/test_Tails_ISO_stable/4731/cucumber-html-reports/report-feature_20_1315884850.html: Looks like the Return key was received twice, because the video shows that the "configure language" menu is immediately closed after it opened. ([video](/uploads/d59b267b08adfa0986fb9942b13d7e4d/02_33_19_Tails_is_localized_for_every_tier-1_language__Examples___11_.mkv), [debug.log](/uploads/f6bef8cb8c6a56d65031779664ca114a/debug.log)) * https://jenkins.tails.boum.org/job/test_Tails_ISO_stable/4732/cucumber-html-reports/report-feature_40_3251716293.html: Looks like the `@screen.press('alt', 'k')` resulted in a "k" being entered in the text entry. ([video](/uploads/f37bfa0ccbfd45a19ba16e83ef7d87f7/04_13_38_Use_GNOME_Disks_to_unlock_a_USB_drive_that_has_a_basic_VeraCrypt_volume_with_a_keyfile.mkv))
issue