moneymanagerex / moneymanagerex

Money Manager Ex is an easy to use, money management application built with wxWidgets
http://moneymanagerex.org
GNU General Public License v2.0
1.75k stars 273 forks source link

Comma key of numeric keypad creates dot instead of comma in transaction amount field #6441

Open schoch opened 8 months ago

schoch commented 8 months ago

MMEX version:

Operating System:

Description of the bug

I have a laptop with a full-size keyboard. This means that I have two keys to generate a comma. One of them is part of the numeric keypad. When I use this specific key to add an amount of money to a transaction, it produces an unexpected result. The key generates in this very specific situation a dot and not a comma. And that leads to wrong amounts since the dot ist used as a thousands separator in my locale (German). The comma key works as expected in every other input field - even in all input fields in the MMEX application. The other comma key works as expected in every situation.

Reproduction

Is the bug reproducible?

Reproduction steps:

Expected result:

Actual result:

Additional information

The comma key (of the numeric keypad) generates a comma in all other input field. And that includes all input fields in the MMEX application. And outside of MMEX it works also as expected.

System info:

renato-mmex commented 8 months ago

and if you use this setting here

image
schoch commented 8 months ago

Yes, I have exactly that setting set to the German format. And it works - this ist not the actual problem.

My laptop has two different keys for the comma symbol. And one of these keys does not work as expected but only in the amount input field. It works in every other app on my laptop and it works in every other input field in the MMEX app. I am a dev by myself and I can't explain that strange behavior to me.

renato-mmex commented 8 months ago

I have already understood the problem, I am just trying to find the cause. From my point of view, there are two possibilities: a) Setting in Windows https://www.netzwelt.de/anleitung/180284-windows-10-punkt-statt-komma-nummernblock-festlegenso-gehts.html b) Error in the code table of de-DE by the way: when I activate de-DE with my Windows 11, I also have the point, so probably b)

schoch commented 8 months ago

Thanks for your effort. I would also go for b)

When I searched the web for possible solutions, I found a) and verified that setting.

Please let me know if I can provide any more information.

renato-mmex commented 8 months ago

There was the same problem before: https://github.com/moneymanagerex/moneymanagerex/issues/3622 @whalley

whalley commented 8 months ago

We seem to have some code to process the Keypad 'decimal point' key key and it looks to always map the input to the DECIMAL POINT in the currency definition... Maybe some bug in this code.

https://github.com/moneymanagerex/moneymanagerex/blob/5e783381f024acd49e53b6b2753efd233c009251/src/validators.h#L81-L95

n-stein commented 7 months ago

We seem to have some code to process the Keypad 'decimal point' key key and it looks to always map the input to the DECIMAL POINT in the currency definition

I changed this behavior in the fix for #6474. It should now map to the locale decimal (if locale is set in Options), otherwise it will map to the currency decimal. Maybe that resolves this issue as well.