Bug 449706 - Keypad decimal separator should respect regional formatting
Summary: Keypad decimal separator should respect regional formatting
Status: CONFIRMED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_keyboard (show other bugs)
Version: 5.23.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-06 17:21 UTC by Mattia
Modified: 2024-11-20 15:18 UTC (History)
9 users (show)

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 Mattia 2022-02-06 17:21:11 UTC
SUMMARY
I'm using Italian regional format in KDE settings, but despite of that the keypad decimal separator always inserts a '.' (dot) instead of a ',' (comma).


STEPS TO REPRODUCE
1. open system settings, regional settings, format and set Italy
2. open system settings, input devices, keyboard
3. focus the test area field and push the Del/. button on keypad (while Num Lock is on) 

OBSERVED RESULT
A '.' (dot) is entered.

EXPECTED RESULT
Italian regional settings use ',' (comma as decimal separator, so pressing the Del/. key on the keypad should enter a ',' (comma)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
Operating System: Fedora Linux 35
KDE Plasma Version: 5.23.5
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.5-200.fc35.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5700G with Radeon Graphics
Memory: 27.3 GiB of RAM
Graphics Processor: AMD RENOIR

ADDITIONAL INFORMATION
I've also tried in the keyboard advanced settings to enable keyboard option "Del behavior" to '4th level with abstract separator', but it doesn't work (nothing is inserted in test area with that option enabled)
Comment 1 Mattia 2023-06-17 08:48:28 UTC
keypad dot is always inserted as dot (not as decimal separator) when running KDE under Wayland, works fine under X11
Comment 2 Vlad Zahorodnii 2023-09-18 12:46:16 UTC
Can you check whether running app through xwayland makes a difference? a qt application can be forced to run through xwayland by passing -platform xcb argument, e.g. `kate -platform xcb`
Comment 3 Mattia 2023-09-18 15:34:35 UTC
(In reply to Vlad Zahorodnii from comment #2)
> Can you check whether running app through xwayland makes a difference? a qt
> application can be forced to run through xwayland by passing -platform xcb
> argument, e.g. `kate -platform xcb`

Thanks, yes, forcing xwayland make it work as expected.
I tried with `kmymoney -platform xcb` and also a GTK app with `env WAYLAND_DISPLAY= libreoffice`.
Comment 4 Sébastien P. 2023-10-15 14:36:14 UTC
I had the same bug wiht French keyboard.
Also notice that it depends on the variant.

In my first test, I used “latin9” variant (system settings, input devices, keyboard, dispositions). And `env WAYLAND_DISPLAY= libreoffice` did not change anything.
Same thing with variant called “variant”.

But with no variant or with the variant “obsolete variant”, the decimal separator is good on LibreOffice Calc with `env WAYLAND_DISPLAY= libreoffice`.

So the workaround is working only for some layout variants.
Comment 5 Mattia 2024-02-10 11:04:28 UTC
Tested today with:

Operating System: Fedora Linux 40
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.6.1
Kernel Version: 6.8.0-0.rc0.20240112git70d201a40823.5.fc40.x86_64 (64-bit)

Still not working as expected.
Looking at the keyboard mapping graphical preview (System Settings -> Input Devices -> Keyboard -> Mappings) the keypad button is mapped as ". / KP Delete", but I suppose it should be mapped as "KP Decimal / KP Delete" to respect regional settings?
Comment 6 vive.linux 2024-03-08 15:37:38 UTC
Same problem with a Belgian keyboard (no variant).
In advanced settings for keyboard, I have selected 'Touche à quatre niveaux avec le séparateur décimal abstrait' and indeed
wev shows that the numpad decimal point gives the expected

[14:     wl_keyboard] key: serial: 2235; time: 4186562; key: 91; state: 1 (pressed)
                      sym: KP_Decimal   (65454), utf8: '.'
[14:     wl_keyboard] key: serial: 2236; time: 4186637; key: 91; state: 0 (released)
                      sym: KP_Decimal   (65454), utf8: ''

yet kmymoney and libreoffice calc behaves as if it was a regular point.
My locale is set to

LANG=fr_BE.UTF-8
LC_CTYPE="fr_BE.UTF-8"
LC_NUMERIC="fr_BE.UTF-8"
LC_TIME="fr_BE.UTF-8"
LC_COLLATE="fr_BE.UTF-8"
LC_MONETARY="fr_BE.UTF-8"
LC_MESSAGES="fr_BE.UTF-8"
LC_PAPER="fr_BE.UTF-8"
LC_NAME="fr_BE.UTF-8"
LC_ADDRESS="fr_BE.UTF-8"
LC_TELEPHONE="fr_BE.UTF-8"
LC_MEASUREMENT="fr_BE.UTF-8"
LC_IDENTIFICATION="fr_BE.UTF-8"
LC_ALL=

The problem disappears when I use kmymoney --platform xcb or env WAYLAND_DISPLAY= libreoffice

When I try using another wayland compositor like hyprland, no problem with libreoffice calc (but problem with kmymoney).
Comment 7 vive.linux 2024-03-08 15:40:12 UTC
(In reply to vive.linux from comment #6)
> Same problem with a Belgian keyboard (no variant).
> In advanced settings for keyboard, I have selected 'Touche à quatre niveaux
> avec le séparateur décimal abstrait' and indeed
> wev shows that the numpad decimal point gives the expected
> 
> [14:     wl_keyboard] key: serial: 2235; time: 4186562; key: 91; state: 1
> (pressed)
>                       sym: KP_Decimal   (65454), utf8: '.'
> [14:     wl_keyboard] key: serial: 2236; time: 4186637; key: 91; state: 0
> (released)
>                       sym: KP_Decimal   (65454), utf8: ''
> 
> yet kmymoney and libreoffice calc behaves as if it was a regular point.
> My locale is set to
> 
> LANG=fr_BE.UTF-8
> LC_CTYPE="fr_BE.UTF-8"
> LC_NUMERIC="fr_BE.UTF-8"
> LC_TIME="fr_BE.UTF-8"
> LC_COLLATE="fr_BE.UTF-8"
> LC_MONETARY="fr_BE.UTF-8"
> LC_MESSAGES="fr_BE.UTF-8"
> LC_PAPER="fr_BE.UTF-8"
> LC_NAME="fr_BE.UTF-8"
> LC_ADDRESS="fr_BE.UTF-8"
> LC_TELEPHONE="fr_BE.UTF-8"
> LC_MEASUREMENT="fr_BE.UTF-8"
> LC_IDENTIFICATION="fr_BE.UTF-8"
> LC_ALL=
> 
> The problem disappears when I use kmymoney --platform xcb or env
> WAYLAND_DISPLAY= libreoffice
> 
> When I try using another wayland compositor like hyprland, no problem with
> libreoffice calc (but problem with kmymoney).

Forgot to specify this :

KDE Plasma Version: 6.0.1
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.8-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx
Graphics Processor: AMD Radeon Vega 8 Graphics
Comment 8 Thomas Rossi 2024-08-16 19:41:49 UTC
I get it too on 2 different laptop with Fedora 40 installed:
Operating System: Fedora Linux 40
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.4-200.fc40.x86_64 (64-bit)
Graphics Platform: Wayland
Comment 9 Marco Menardi 2024-09-03 12:41:42 UTC
For me this is "NOT A BUG"
Sorry but I'm Italian, and old guy, and this is the expected behavior since the first "Italian nationalized PC Keyboard" (decided by IBM) long long time ago, maybe is a bug if your X11 works different!
In Italy we have the Italian layout keyboard numeric pad  with a dot printed on it, even if a coma would be our national decimal separator.
In my long experience, wherever I press that key a dot is produced, but i.e. Excel or KCalc (KDE calculator) or LibreOffice calc  has always converted "on the fly" to a decimal separator.
Another example: on Windows in Notepad you obtain a dot, in Calculator you get decimal separator, so this is the expected behavior from the majority of Italian population.
I've tried Kubuntu 24.04 with X11 and Wayland, same behavior (dot in Kate, decimal separator in KCalc)
If this "bug" would be fixed at KDE level, when I enter IPV4 in the console I would get mad having a "," instead of a ".".
So for me this is "NOT A BUG" and should not be fixed not to break the expected behavior, at least for Italy, or should be configurable (a flag like "force numeric keypad to national decimal separator", maybe to temporary workaround dedicated programs problem).
Comment 10 Marco Menardi 2024-09-03 12:51:08 UTC
Unfortunately I can't edit my previous comment.
To clarify, OMHO this is a LibreOffice bug, should be fixed by Libreoffice-kde intagration (-KF5/6), that works well with X11 and not with Wayland.
When I wrote that works the same in X11 and Wayland, I meant the "keyboard system settings" part, not LibreOffice.
In short, KDE as usual should not remap the key of the numeric keypad, the programs that are "heavily numeric oriented" should.
The fact that Libreoffice works fine with X11 and not with Wayland, but the KDE in  both cases interprets that key as a dot, proves my point.
Comment 11 Bug Janitor Service 2024-09-18 03:46:54 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Mattia 2024-09-18 06:00:06 UTC
This is not just a Libreoffice bug, as it happens with KDE apps as well (see my comment#3 about kmymoney).

IMO the keypad key should be mapped as "KP Decimal / KP Delete" instead of ". / KP Delete" (see comment#5), so that the apps can decide how to manage the provided input.