SUMMARY When adding a custom shortcut Meta+Shift+7 using System Settings Instead of "Meta+&", "Meta+" is displayed under the "Custom shortcuts" label. However, beside the name of the shortcut, "Meta+&" is correctly displayed. STEPS TO REPRODUCE 1. Open "Shortcuts" 2. Add "Meta+Shift+7" as a shortcut to something (using the custom shortcuts feature) OBSERVED RESULT "Meta+" shown under "Custom shortcuts" EXPECTED RESULT "Meta+&" shown under "Custom shortcuts" SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE neon 5.21 (User) on Linux 5.4.0-73-generic KDE Plasma Version: 5.21.5 (X11) KDE Frameworks Version: 5.82.0 Qt Version: 5.12.2 ADDITIONAL INFORMATION Maybe this is because the ampersand isn't correctly escaped? (I think & is used for Qt stuff?)
Yeah, looks like it's not correctly escaped.
Hi, I was just wondering, since I think the keyboard shortcut widget is used in many places, the fix would be on the widget, not the System Settings app? Thanks, Ken
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kdeclarative/-/merge_requests/61
(In reply to Colour Delete from comment #2) > Hi, > > I was just wondering, since I think the keyboard shortcut widget is used in > many places, the fix would be on the widget, not the System Settings app? > > Thanks, > Ken Yup. :)
Understood; thank you!
Git commit ca86b73f754947b1a2c1a0223c81634480c3a3f1 by Nate Graham. Committed on 27/05/2021 at 22:59. Pushed by ngraham into branch 'master'. [KeySequenceItem] Display ampersands in shortcuts We have to replace the single ampersand that we get back from QKeySequence::toString() to be two ampersands, because the QQC2 Button that will display this string interprets a single ampersand as a mnemonic and hides it, which is not correct for our use of it here. FIXED-IN: 5.83 M +6 -1 src/qmlcontrols/kquickcontrols/KeySequenceItem.qml https://invent.kde.org/frameworks/kdeclarative/commit/ca86b73f754947b1a2c1a0223c81634480c3a3f1