Bug 357824 - Decimal point on numpad not working for en_GB and Danish keyboard layout
Summary: Decimal point on numpad not working for en_GB and Danish keyboard layout
Status: RESOLVED FIXED
Alias: None
Product: kcalc
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Evan Teran
URL:
Keywords:
: 374929 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-01-10 23:45 UTC by Torben Hansen
Modified: 2018-10-02 22:12 UTC (History)
2 users (show)

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


Attachments
Proposed patch (1.42 KB, patch)
2017-07-16 09:51 UTC, martonmiklos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torben Hansen 2016-01-10 23:45:16 UTC
Version 15.08.3

This is similar to, which however is reported fixed
https://bugs.kde.org/show_bug.cgi?id=67984

kcalc does nothing when pressing "." on the numpad, while it should result in a decimal separator.
xev generates "keysym 0xffac, KP_Separator" when pressing "." on the numpad.



Reproducible: Always

Steps to Reproduce:
1. Open kcalc
2. Press; KP_1, KP_separator, KP_1
3.

Actual Results:  
"11" in display


Expected Results:  
"1.1" in display

LANG=en_GB.UTF-8
All other locale parameters the same

xorg.conf.d/00-keyboard.conf:
Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "dk"
        Option "XkbModel" "pc105"
        Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection
Comment 1 Christoph Feck 2017-01-12 13:04:02 UTC
*** Bug 374929 has been marked as a duplicate of this bug. ***
Comment 2 Torben Hansen 2017-01-16 23:19:44 UTC
This is still an issue with version 16.08.2
Comment 3 martonmiklos 2017-07-16 09:33:27 UTC
Ok, here is what I see:
- I have set my layout to English UK, and run the kcalc with LANG=en_GB.UTF-8 environment
- I can reproduce it with the latest git master.
- In the keyPressEvent an event with the key is Qt::Key_Comma wit this setup

AFAIK noone would want to type in group separator (thousand separator) with the keypad comma. 

If others can confirm it I can create a patch easily. 

There is already a workaround in the code for the following similar kind of bug:
https://bugs.kde.org/show_bug.cgi?id=314586
Comment 4 martonmiklos 2017-07-16 09:51:57 UTC
Created attachment 106662 [details]
Proposed patch

Proposed patch. Feel free to review!
Comment 5 Torben Hansen 2017-07-16 21:31:37 UTC
I have tested the patch against kcalc-16.08.2. Confirmed that it solve the problem.

Thanks
Comment 6 Christoph Feck 2018-10-02 22:12:17 UTC
Git commit f00e48b6a50fccba2e3a43d06752e2043fd20633 by Christoph Feck, on behalf of Arthur Pichlkostner.
Committed on 02/10/2018 at 22:08.
Pushed by cfeck into branch 'Applications/18.08'.

Allow shortcut keys for both decimal separators point and comma

Re-enable commented out code to handle both '.' and ',' shortcut keys
for the decimal separator. Also port it from KLocale to QLocale.
FIXED-IN: 18.08.2

Test Plan:

Running kcalc with both locale en_US.UTF-8 and de_DE.UTF-8.
In both cases the keys '.' and ',' work.

Reviewed By: cfeck

Differential Revision: https://phabricator.kde.org/D15680

M  +4    -5    kcalc.cpp

https://commits.kde.org/kcalc/f00e48b6a50fccba2e3a43d06752e2043fd20633