Bug 462034 - "Add" function does not work when holding shift on a custom keyboard layout if, on a single key, 'plus' and/or 'KP_Add' is used for both the shifted and unshifted functions
Summary: "Add" function does not work when holding shift on a custom keyboard layout i...
Status: REPORTED
Alias: None
Product: kcalc
Classification: Applications
Component: general (show other bugs)
Version: 22.08.1
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Evan Teran
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-19 19:51 UTC by NM64
Modified: 2022-11-19 19:53 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description NM64 2022-11-19 19:51:13 UTC
If you have customized your keyboard layout to have the plus ( + ) key be present for both shifted and unshifted modes, then the shifted mode will not result in the "add" function occurring in kcalc despite it displaying a + character in kate regardless of whether you are holding the shift key or not.

To clarify, I use the Colemak keyboard layout and have simply modified the file /usr/share/X11/xkb/symbols/us so that, under "Colemak", the line for "key <AE12>" lists the following instead:

    key <AE12> { [        plus,         plus,        multiply,         division ] };

For reference, I then also modify the backslash key so that it instead works as "equal" and shift+backspace works as "backslash"; this is all because one is not able to use the "equal" ( = ) key for the "plus" function as I described in the following suggestion:
https://bugs.kde.org/show_bug.cgi?id=461485


STEPS TO REPRODUCE
1. edit and overwrite the file "/usr/share/X11/xkb/symbols/us" and replace the 'equal' function for "key <AE12>" with the 'add' function (without quotes)
2. log out and log back in
3. confirm in kate that pressing the equal ( = ) key without holding shift sends the 'plus' character, and that holding shift while pressing the equal ( = ) key also sends the 'plus' character
4. open kcalc and click the number 1 with your mouse
5. press the equal ( = ) key on your keyboard
6. click the number 2 with your mouse
7. press the enter key; it should now display a value of "3"
8. click "AC" with your mouse and then press the number 1 with your mouse
9. hold down shift and press the equal ( = ) key on your keyboard
10. click the number 2 with your mouse

OBSERVED RESULT
kcalc is now displaying a value of "12"; it would seem that holding shift while pressing the equal ( = ) key in this scenario did nothing

EXPECTED RESULT
kcalc should have instead did the addition equation of 1 + 2 like it did when you were not holding shift

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 22.10
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
When modifying the file "/usr/share/X11/xkb/symbols/us" it does not matter if you use the 'plus' function or the 'KP_Add' function as both seem to result in the exact same issue, and this issue occurs even if you have the primary unshifted function as 'KP_Add' and the shifted function as 'plus'