Bug 478936 - Unable to bind / use the calculator key in plasma 6 on Wayland
Summary: Unable to bind / use the calculator key in plasma 6 on Wayland
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keys (show other bugs)
Version: 5.91.0
Platform: Arch Linux Linux
: HI normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6, wayland
: 433645 478283 479232 480955 482796 483105 484142 485180 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-12-23 12:57 UTC by qlum
Modified: 2024-04-07 15:29 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In: Plasma 6.0 with Qt 6.6.3 or later


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description qlum 2023-12-23 12:57:16 UTC
When trying to use a previously made keybinding to the calculator key it no longer, nor will an input be registered when trying to make a new shortcut using the calculator key.
By default, this key is bound to opening kcalc, this also does not work. 


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.91
KDE Frameworks Version: 5.257.0 
Qt Version: 6.7

ADDITIONAL INFORMATION
There is a similar issue about f24 not working, this has been the case for longer. The calculator button worked as intended in plasma 5.27.
I tested this on 3 machines, one with plasma 5.27 and 2 on plasma 6 beta 2. On 2 different keyboards.
Comment 1 Nicolas Fella 2024-01-01 17:57:43 UTC
*** Bug 479232 has been marked as a duplicate of this bug. ***
Comment 2 Prajna Sariputra 2024-01-02 00:23:35 UTC
*** Bug 478283 has been marked as a duplicate of this bug. ***
Comment 3 Steven Eastland 2024-01-02 09:15:52 UTC
As I mentioned in the bug I filed that was marked as a duplicate of this one, my calculator key works in an X11 session, but not in a Wayland session.
Comment 4 fanzhuyifan 2024-01-12 00:47:50 UTC
I cannot assign the calculator key to shortcuts on either X11 or wayland. On x11 when I press it kcalc shows up, but does not on wayland.
Comment 5 fanzhuyifan 2024-01-30 17:46:19 UTC
The problem seems to be `QXkbCommon::keysymToQtKey` returning 0 when keysym is `0x1008FF1D` (this is called in `Xkb::toQtKey` in kwin/src/xkb.cpp)
Comment 6 fanzhuyifan 2024-01-30 18:10:55 UTC
In my setup, the problem is caused by XkbCommon::keysymToQtKey mapping XF86XK_Calculater but not XF86XK_Calculator, which are different keys. Should I try to upstream a patch to Qt?
Comment 7 fanzhuyifan 2024-01-30 18:44:58 UTC
Filed upstream bugreport to Qt: https://bugreports.qt.io/browse/QTBUG-121713
Comment 8 Bug Janitor Service 2024-01-31 04:34:34 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kwindowsystem/-/merge_requests/145
Comment 9 Bug Janitor Service 2024-01-31 04:44:44 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kcalc/-/merge_requests/77
Comment 10 Bug Janitor Service 2024-02-01 01:37:01 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kglobalacceld/-/merge_requests/42
Comment 11 fanzhuyifan 2024-02-01 21:24:59 UTC
Git commit 03aea8cbe369689503a89fafb75465b79f19a8b4 by Yifan Zhu.
Committed on 01/02/2024 at 21:22.
Pushed by fanzhuyifan into branch 'master'.

kkeyserver: use new XF86keysym.h & qxcbcommon.cpp

Include the latest XF86keysym.h.
Update the key mappings to match the latest qxcbcommon.cpp in Qt6.

M  +608  -275  src/kkeyserver.cpp

https://invent.kde.org/frameworks/kwindowsystem/-/commit/03aea8cbe369689503a89fafb75465b79f19a8b4
Comment 12 fanzhuyifan 2024-02-01 21:29:29 UTC
The Qt patch should be included in the upcoming Qt 6.6.3, and Qt 6.7. The remaining problems on KDE's side should be fixed by the MRs mentioned above.
Comment 13 fanzhuyifan 2024-02-01 23:12:16 UTC
Git commit 254efa0a59d19e4133d5c2c95722cceb472e0b4c by Yifan Zhu.
Committed on 01/02/2024 at 21:25.
Pushed by fanzhuyifan into branch 'master'.

plugins/xcb/kglobalaccel_x11: use new KKeyServer API

To correctly handle Qt::Key_Calculator corresponding to both
XF86Calculator and XF86Calculater.

M  +11   -3    src/plugins/xcb/kglobalaccel_x11.cpp

https://invent.kde.org/plasma/kglobalacceld/-/commit/254efa0a59d19e4133d5c2c95722cceb472e0b4c
Comment 14 fanzhuyifan 2024-02-01 23:13:53 UTC
Git commit acb1d829ae63d9c5246d499b287a9304b504b50d by Yifan Zhu.
Committed on 01/02/2024 at 23:12.
Pushed by fanzhuyifan into branch 'Plasma/6.0'.

plugins/xcb/kglobalaccel_x11: use new KKeyServer API

To correctly handle Qt::Key_Calculator corresponding to both
XF86Calculator and XF86Calculater.


(cherry picked from commit 254efa0a59d19e4133d5c2c95722cceb472e0b4c)

M  +11   -3    src/plugins/xcb/kglobalaccel_x11.cpp

https://invent.kde.org/plasma/kglobalacceld/-/commit/acb1d829ae63d9c5246d499b287a9304b504b50d
Comment 15 fanzhuyifan 2024-02-01 23:16:34 UTC
Git commit 2a9dd8f8c0401521a8e7c1928e8fa8b03faf8ffa by Yifan Zhu.
Committed on 01/02/2024 at 23:14.
Pushed by fanzhuyifan into branch 'master'.

Change default shortcut to Calculator

Qt6 no longer maps the calculator key to Key_Launch1

M  +1    -2    org.kde.kcalc.desktop

https://invent.kde.org/utilities/kcalc/-/commit/2a9dd8f8c0401521a8e7c1928e8fa8b03faf8ffa
Comment 16 fanzhuyifan 2024-02-06 17:06:01 UTC
*** Bug 480955 has been marked as a duplicate of this bug. ***
Comment 17 Nicolas Fella 2024-03-08 23:26:22 UTC
*** Bug 482796 has been marked as a duplicate of this bug. ***
Comment 18 Nate Graham 2024-03-08 23:30:10 UTC
What releases did this fix make it into? I can't actually tell.
Comment 19 fanzhuyifan 2024-03-08 23:53:44 UTC
(In reply to Nate Graham from comment #18)
> What releases did this fix make it into? I can't actually tell.

On our end, the plasma 6 mega-release. On Qt's end, the upcoming 6.6.3 and 6.7. The Qt patch was not included in 6.6.2.
Comment 20 Nate Graham 2024-03-10 20:08:22 UTC
Thanks!
Comment 21 fanzhuyifan 2024-03-10 20:51:16 UTC
*** Bug 483105 has been marked as a duplicate of this bug. ***
Comment 22 qlum 2024-03-11 13:30:34 UTC
Testing it again on plasma 6.0.1 and qt 6.7 I can confirm that I can bind the calculator key again.
However, I do need to manually set the binding again, as the old binding will remain non-functional.
Comment 23 Richard Knausenberger 2024-03-14 15:23:13 UTC
(In reply to qlum from comment #22)
> Testing it again on plasma 6.0.1 and qt 6.7 I can confirm that I can bind
> the calculator key again.
> However, I do need to manually set the binding again, as the old binding
> will remain non-functional.

Plasma 6.0.1, Qt 6.7.7-1 on openSUSE Tumbleweed/X11 here, still doesn't work for the calculator key of my Ducky One keyboard.
Comment 24 fanzhuyifan 2024-03-14 15:26:33 UTC
(In reply to Richard Knausenberger from comment #23)
> (In reply to qlum from comment #22)
> > Testing it again on plasma 6.0.1 and qt 6.7 I can confirm that I can bind
> > the calculator key again.
> > However, I do need to manually set the binding again, as the old binding
> > will remain non-functional.
> 
> Plasma 6.0.1, Qt 6.7.7-1 on openSUSE Tumbleweed/X11 here, still doesn't work
> for the calculator key of my Ducky One keyboard.

I don't think currently there is Qt 6.7.7 -- Qt 6.7 is still in rc1.
Comment 25 duha.bugs 2024-03-21 15:04:47 UTC
*** Bug 484142 has been marked as a duplicate of this bug. ***
Comment 26 Nate Graham 2024-03-26 18:43:19 UTC
*** Bug 433645 has been marked as a duplicate of this bug. ***
Comment 27 fanzhuyifan 2024-04-07 15:29:35 UTC
*** Bug 485180 has been marked as a duplicate of this bug. ***