Working around KDE shortcut injection - GoldenCheetah/GoldenCheetah GitHub Wiki

Working around KDE shortcut injection

tl;dr

If dialogs in GC gets stuck, i.e. don't advance to the next step or don't react at all, and you are on KDE, then KDE's automatic keyboard shortcut injection is probably the reason.

It can be turned off user-globally by adding

[Development]
AutoCheckAccelerators=false

to ~/.config/kdeglobals

Details

With the KDE Desktop all QT processes load KDEPlatformTheme.so, which automatically injects keyboard shortcuts for dialog buttons. In QT, shortcuts are declared with an & as the first character of the button text. If a button text is set to "Finish", it reads back "&Finish".

In several GoldenCheetah dialogs, button text is used to store a state of the dialog. For example (from src/Gui/BatchExportDialog.cpp:

if (ok->text() == "Export" || ok->text() == tr("Export"))

This means, if the read-back button text doesn't match the expected values, the dialog state machine gets stuck and the dialog is unusable.

This can be solved by getting rid of the implicit state encodings in button text, or by getting rid of the injected shortcuts by adding

[Development]
AutoCheckAccelerators=false

to ~/.config/kdeglobals

Reference links