Bug 449706 - Keypad decimal separator should respect regional formatting
Summary: Keypad decimal separator should respect regional formatting
Status: REPORTED
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-03-08 15:40 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


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