Bug 159333 - kf5: Commands triggered via keyboard shortcut are executed twice when accessibility is active
Summary: kf5: Commands triggered via keyboard shortcut are executed twice when accessi...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Michael Weghorn
URL:
Whiteboard: target:24.8.0 target:7.6.5 target:24.2.1
Keywords: accessibility
Depends on:
Blocks: KDE, KF5
  Show dependency treegraph
 
Reported: 2024-01-23 08:05 UTC by Michael Weghorn
Modified: 2024-01-24 11:15 UTC (History)
2 users (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 Michael Weghorn 2024-01-23 08:05:39 UTC
When a11y is active, using keyboard shortcuts results for commands results in those being executed twice when using any of the Qt-based VCL plugins (kf5/qt5/qt6).

Steps to reproduce:

1) start the Orca screen reader
2) start LO Writer with the kf5 VCL plugin
3) type "hello" into the document
4) select the text "hello"
5) press Ctrl+C to copy
6) position cursor at the end of the text
7) press Ctrl+V to insert the text

Actual result:
The text is pasted twice, i.e. the text after that is "hellohellohello"

Expected result:
The text should only be pasted once, i.e. the resulting text in the doc should be "hellohello".

Further information:
It works as expected when the Orca screen reader is not running.
Another example is pressing Ctrl+B which should toggle the "bold" status. However, the status of the "bold" toolbar item only changes for a small part of a second, then switches back to what it was (because it is toggled twice).

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 701eb22d9cb0c5ed785df09acf0d14d16d64a768
CPU threads: 12; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 1 Michael Weghorn 2024-01-23 08:07:22 UTC
This is probably the same underlying issue as in the issue that Olivier described in bug 126785:

(Olivier Hallot in bug 126785 comment #48)
> Some member of the BR community including me still have issues with the
> Linux KDE+LibreOfffice (TDF) combination and we narrowed it to the mandatory
> installation of a proprietary security module by most Brazilian banks:
> 
> https://www.itau.com.br/guardiao
> https://seg.bb.com.br/home.html#en
> 
> deb package:
> https://guardiao.itau.com.br/warsaw/warsaw_setup_64.deb
> 
> Contents:
> -----------------------8<----------------------
> olivier@olivier-ntbk:/tmp$ dpkg -I warsaw_setup_64.deb
>  novo pacote Debian, versão 2.0.
>  6156850 bytes de tamanho: arquivo de controle=2554 bytes.
>       41 bytes,     2 lines      conffiles
>      642 bytes,    14 lines      control
>     1785 bytes,    27 lines      md5sums
>      983 bytes,    46 linhas   *  postinst             #!/bin/bash
>      571 bytes,    31 linhas   *  postrm               #!/bin/bash
>      976 bytes,    58 linhas   *  preinst              #!/bin/bash
>     1125 bytes,    61 linhas   *  prerm                #!/bin/bash
>  Package: warsaw
>  Version: 2.21.3-1
>  Architecture: amd64
>  Maintainer: Topaz OFD Desktop
> <https://www.topaz.com.br/ofd/contato-antifraude.php>
>  Installed-Size: 29059
>  Depends: libdbus-1-3, procps, zenity, python3
>  Suggests: python3-gpgme | python3-gpg
>  Section: non-free/net
>  Priority: optional
>  Description: Package warsaw provides the needed software to use some
> banking services
>   The package warsaw will easily add the required software to let you use
> some
>   of the internet banking services of popular financial organizations in
> South
>   America. If you are unsure if you need this package please call your
> service
>   desk and ask them for instructions.
> -----------------------8<----------------------
> 
> The issue is slightly different that reported above, any keyboard
> combination using left Ctrl key duplicates the command (Ctrl+O opens
> filepicker twice, Ctrl+P paste twice).
> 
> KDE + LO (tdf) installation without warsaw.deb works fine (no command dup).
> 
> -----------------------8<----------------------
> Version: 7.6.4.1 (X86_64) / LibreOffice Community
> Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
> CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
> Locale: pt-BR (pt_BR.UTF-8); UI: pt-BR
> Calc: threaded
> -----------------------8<----------------------
> -----------------------8<----------------------
> Operating System: Kubuntu 23.10
> KDE Plasma Version: 5.27.8
> KDE Frameworks Version: 5.110.0
> Qt Version: 5.15.10
> Kernel Version: 6.5.0-14-generic (64-bit)
> Graphics Platform: X11
> Processors: 8 × Intel® Core™ i7-3632QM CPU @ 2.20GHz
> Memory: 7.6 GiB of RAM
> Graphics Processor: AMD TURKS
> Manufacturer: Dell Inc.
> Product Name: Vostro 3560
> System Version: A20
> -----------------------8<----------------------
Comment 2 Michael Weghorn 2024-01-23 08:39:39 UTC
Pending fix: https://gerrit.libreoffice.org/c/core/+/162430

(In reply to Michael Weghorn from comment #1)
> This is probably the same underlying issue as in the issue that Olivier
> described in bug 126785:
> 
> (Olivier Hallot in bug 126785 comment #48)
> > Some member of the BR community including me still have issues with the
> > Linux KDE+LibreOfffice (TDF) combination and we narrowed it to the mandatory
> > installation of a proprietary security module by most Brazilian banks:
> > (...)

@Olivier: Could you please check whether that scenario is also fixed by that?
Comment 3 Commit Notification 2024-01-23 13:25:54 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6e20e58270c88c8c77f156be75c23c66e1169e44

tdf#159333 qt a11y: Process shortcuts only once

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Michael Weghorn 2024-01-23 13:28:13 UTC
Use case from initial description fixed in master now. (Hopefully also the use case from comment 1, but I haven't explicitly tested that myself.)

Backports for 24-2 and 7-6 pending in Gerrit.

https://gerrit.libreoffice.org/c/core/+/162453
https://gerrit.libreoffice.org/c/core/+/162454
Comment 5 Commit Notification 2024-01-24 11:15:42 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/33c646b5044f77de2f1740f6e6b8c951139a96eb

tdf#159333 qt a11y: Process shortcuts only once

It will be available in 7.6.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2024-01-24 11:15:45 UTC
Michael Weghorn committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/ac136a069ef69fd7e9c71256a93499475631794b

tdf#159333 qt a11y: Process shortcuts only once

It will be available in 24.2.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.