Discussion:
Period key in numeric keypad doesn't act as a decimal separator in my locale
Orestes Mas
2006-05-26 08:31:23 UTC
Permalink
Package: kmymoney2
Version: 0.8.4 3.5.2, Debian Package 4:3.5.2-2 (testing/unstable)
Severity: normal
Compiler: Target: x86_64-linux-gnu
OS: Linux 2.6.16-1-vserver-amd64-k8 x86_64 (Debian Package 4:3.5.2-2 (testing/unstable))

When entering amounts in transactions (and also in every other numerical input field with a calculator widget next to it), using the numerical keypad is paramount. In that situation, the period key must act as a decimal separator regardless of actual caracter used as decimal separator in user's locale.

This isn't working properly in KMyMoney: In my locale (like other countries in Europe) the comma is used as a decimal separator, but if I use the amount input fields to enter decimal numbers, the period isn't translated properly into a comma and strange results are obtained.

For example:
-entering 3479.58 results into 347.958,00 (!!!) instead of 3.479,58

-entering 3479,58 results into 3.479,58, which is correct, but you have to go to the main keyboard to press the comma key, which is annoying.

Please note that if you use the calculator widget to enter the amount, then the period key DOES work properly as a decimal separator: when pressed, the period is automatically translated into a comma, so there is no problem here, but you have to use the mouse to open the calculator -an unnecessary step if you don't want to calculate-


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
Thomas Baumgart
2006-05-26 08:37:43 UTC
Permalink
Hi all,
Post by Orestes Mas
Package: kmymoney2
Version: 0.8.4 3.5.2, Debian Package 4:3.5.2-2 (testing/unstable)
Severity: normal
Compiler: Target: x86_64-linux-gnu
OS: Linux 2.6.16-1-vserver-amd64-k8 x86_64 (Debian Package 4:3.5.2-2 (testing/unstable))
When entering amounts in transactions (and also in every other numerical
input field with a calculator widget next to it), using the numerical
keypad is paramount. In that situation, the period key must act as a
decimal separator regardless of actual caracter used as decimal
separator in user's locale.
This isn't working properly in KMyMoney: In my locale (like other
countries in Europe) the comma is used as a decimal separator, but if I
use the amount input fields to enter decimal numbers, the period isn't
translated properly into a comma and strange results are obtained.
This has been reported before. Unfortunately, this is not a KMyMoney issue
but depends on the keyboard settings of your X Evironment.

I am using the German locale and everything works just fine.
Post by Orestes Mas
-entering 3479.58 results into 347.958,00 (!!!) instead of 3.479,58
-entering 3479,58 results into 3.479,58, which is correct, but you have
to go to the main keyboard to press the comma key, which is annoying.
Please note that if you use the calculator widget to enter the amount,
then the period key DOES work properly as a decimal separator: when
pressed, the period is automatically translated into a comma, so there
is no problem here, but you have to use the mouse to open the calculator
-an unnecessary step if you don't want to calculate-
Yes, because the calculator widget treats comma and dot input alike.
--
Regards

Thomas Baumgart

thb-***@public.gmane.org Check the KMyMoney open source
http://www.net-bembel.de/ project at http://kmymoney2.sf.net/

GPG-FP: E55E D592 F45F 116B 8429 4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
Not everything that counts can be counted,
and not everything that can be counted counts.
-------------------------------------------------------------
Rui Malheiro
2006-05-26 10:13:38 UTC
Permalink
Post by Orestes Mas
When entering amounts in transactions (and also in every other numerical
input field with a calculator widget next to it), using the numerical
keypad is paramount. In that situation, the period key must act as a
decimal separator regardless of actual caracter used as decimal separator
in user's locale.
This isn't working properly in KMyMoney: In my locale (like other countries
in Europe) the comma is used as a decimal separator, but if I use the
amount input fields to enter decimal numbers, the period isn't translated
properly into a comma and strange results are obtained.
As Tom said, this is a X11 "problem", and has to do with how your locale maps
the numpad comma key. Look in /usr/X11R6/lib/X11/xkb/symbols/ for your locale
key mapping and make sure it includes "keypad(comma)". Should look something
like this:

===========================================================
// $XKeyboardConfig: xkbdesc/symbols/pt,v 1.6 2005/01/16 02:18:20 svu Exp $

// based on a keyboard map from an 'xkb/symbols/pt' file
//
// $XFree86: xc/programs/xkbcomp/symbols/pt,v 1.2 2002/11/22 04:03:28 dawes
Exp $

partial default alphanumeric_keys
xkb_symbols "basic" {

include "latin(type4)"

name[Group1]="Portugal";

key <AE03> { [ 3, numbersign, sterling, sterling ] };
key <AE04> { [ 4, dollar, section, dollar ] };
key <AE11> { [apostrophe, question, backslash, questiondown ] };
key <AE12> { [guillemotleft, guillemotright, dead_cedilla,
dead_ogonek ] };

key <AD11> { [ plus, asterisk, dead_diaeresis, dead_abovering ] };
key <AD12> { [dead_acute, dead_grave, dead_tilde, dead_macron ] };

key <AC10> { [ ccedilla, Ccedilla, dead_acute, dead_doubleacute ] };
key <AC11> { [ masculine, ordfeminine, dead_circumflex, dead_caron ] };
key <TLDE> { [ backslash, bar, notsign, notsign ] };

key <BKSL> { [dead_tilde, dead_circumflex, dead_grave, dead_breve] };

include "level3(ralt_switch)"

include "keypad(comma)"
};
...
===========================================================
--
Rui Malheiro
6 Mil - Tecnologias de Informção, Lda.
Lisboa, Portugal <http://www.6mil.pt>
Orestes Mas
2006-05-26 10:46:04 UTC
Permalink
Post by Rui Malheiro
Post by Orestes Mas
When entering amounts in transactions (and also in every other numerical
input field with a calculator widget next to it), using the numerical
keypad is paramount. In that situation, the period key must act as a
decimal separator regardless of actual caracter used as decimal separator
in user's locale.
This isn't working properly in KMyMoney: In my locale (like other countries
in Europe) the comma is used as a decimal separator, but if I use the
amount input fields to enter decimal numbers, the period isn't translated
properly into a comma and strange results are obtained.
As Tom said, this is a X11 "problem", and has to do with how your locale maps
the numpad comma key. Look in /usr/X11R6/lib/X11/xkb/symbols/ for your locale
key mapping and make sure it includes "keypad(comma)". Should look something
Really? Please note that KMyMoney calculator widget DOES have the
correct behaviour without modifying any X11 file, and so DO many other
KDE and non-KDE apps, like OpenOffice Calc, KOffice...

Orestes.


-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
Rui Malheiro
2006-05-26 15:23:27 UTC
Permalink
Post by Orestes Mas
Really? Please note that KMyMoney calculator widget DOES have the
correct behaviour without modifying any X11 file, and so DO many other
KDE and non-KDE apps, like OpenOffice Calc, KOffice...
There's a difference from "many" to "all". Many applications hardcode this
feature. For example, OpenOffice.org has "Tools->Options->Language
Settings->Languages->Decimal Separator Key".

Open a Konsole and press the numpad comma key. From your report I bet you'll
get a dot. Now set your keymap to some locale that implements the comma as
decimal separator on the keypad (ie: "de"):

# setxkbmap -layout de

Now you get a comma when you press the keypad decimal separator key in Konsole
and everywere in X (unless some application is hardcoded to output a dot). Of
course you also get a german keymap which is probably not what you want. :)
That's where you need to edit your country code file in /etc/X11/xkb/symbols.
--
Rui Malheiro
6 Mil - Tecnologias de Informção, Lda.
Lisboa, Portugal <http://www.6mil.pt>
Cohan
2007-10-13 14:27:47 UTC
Permalink
Post by Rui Malheiro
Post by Orestes Mas
Really? Please note that KMyMoney calculator widget DOES have the
correct behaviour without modifying any X11 file, and so DO many other
KDE and non-KDE apps, like OpenOffice Calc, KOffice...
There's a difference from "many" to "all". Many applications hardcode this
feature. For example, OpenOffice.org has "Tools->Options->Language
Settings->Languages->Decimal Separator Key".
Open a Konsole and press the numpad comma key. From your report I bet you'll
get a dot. Now set your keymap to some locale that implements the comma as
# setxkbmap -layout de
If I open up Konsole and press the numpad comma key I get a comma. If I
enter the amount 10<numpad-comma>50 in a transaction in KMyMoney it
registers as 1,050.00
I checked the xkb/symbols/se file as per previous post and it already
contained the include "keypad(comma)"

I'm a new user to KMyMoney. Tried to google an answer, and this thread was
the closest I found so I'm asking here even though this thread is more then
a year old.
Post by Rui Malheiro
Now you get a comma when you press the keypad decimal separator key in Konsole
and everywere in X (unless some application is hardcoded to output a dot). Of
course you also get a german keymap which is probably not what you want. :)
That's where you need to edit your country code file in
/etc/X11/xkb/symbols.
regards
Konrad Skeri
--
View this message in context: http://www.nabble.com/Period-key-in-numeric-keypad-doesn%27t-act-as-a-decimal-separator-in-my-locale-tf1685579.html#a13190087
Sent from the kmymoney2-developer mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Thomas Baumgart
2007-10-14 15:27:00 UTC
Permalink
Hi all,
Post by Cohan
Post by Rui Malheiro
Post by Orestes Mas
Really? Please note that KMyMoney calculator widget DOES have the
correct behaviour without modifying any X11 file, and so DO many
other KDE and non-KDE apps, like OpenOffice Calc, KOffice...
There's a difference from "many" to "all". Many applications hardcode
this feature. For example, OpenOffice.org has
"Tools->Options->Language Settings->Languages->Decimal Separator Key".
Open a Konsole and press the numpad comma key. From your report I bet you'll
get a dot. Now set your keymap to some locale that implements the
# setxkbmap -layout de
If I open up Konsole and press the numpad comma key I get a comma. If I
enter the amount 10<numpad-comma>50 in a transaction in KMyMoney it
registers as 1,050.00
I checked the xkb/symbols/se file as per previous post and it already
contained the include "keypad(comma)"
No, that's not the problem here. I assume, that your locale settings in KDE
Control Center are not correct.

Open Control Center. Select Country/Region & Language. Goto the Money tab.
Are 'Decimal Symbol' and 'Thousands separator' setup correct?
Post by Cohan
I'm a new user to KMyMoney. Tried to google an answer, and this thread
was the closest I found so I'm asking here even though this thread is
more then a year old.
That's ok. I was wondering to see such a late response ...
--
Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429 4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
Windows: It's not pretty. It's not ugly. But it's pretty ugly.
-------------------------------------------------------------
Cohan
2007-10-16 17:23:49 UTC
Permalink
Post by Thomas Baumgart
Hi all,
Post by Cohan
Post by Rui Malheiro
Post by Orestes Mas
Really? Please note that KMyMoney calculator widget DOES have the
correct behaviour without modifying any X11 file, and so DO many
other KDE and non-KDE apps, like OpenOffice Calc, KOffice...
There's a difference from "many" to "all". Many applications hardcode
this feature. For example, OpenOffice.org has
"Tools->Options->Language Settings->Languages->Decimal Separator Key".
Open a Konsole and press the numpad comma key. From your report I bet you'll
get a dot. Now set your keymap to some locale that implements the
# setxkbmap -layout de
If I open up Konsole and press the numpad comma key I get a comma. If I
enter the amount 10<numpad-comma>50 in a transaction in KMyMoney it
registers as 1,050.00
I checked the xkb/symbols/se file as per previous post and it already
contained the include "keypad(comma)"
No, that's not the problem here. I assume, that your locale settings in KDE
Control Center are not correct.
Open Control Center. Select Country/Region & Language. Goto the Money tab.
Are 'Decimal Symbol' and 'Thousands separator' setup correct?
Post by Cohan
I'm a new user to KMyMoney. Tried to google an answer, and this thread
was the closest I found so I'm asking here even though this thread is
more then a year old.
That's ok. I was wondering to see such a late response ...
--
Regards
Thomas Baumgart
GPG-FP: E55E D592 F45F 116B 8429 4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
Windows: It's not pretty. It's not ugly. But it's pretty ugly.
-------------------------------------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
KMyMoney2-developer mailing list
https://lists.sourceforge.net/lists/listinfo/kmymoney2-developer
Solved! I'm running Gnome. Had to install the KDE control center and setup
Country/Region there as well. I thought they automaticly used each others
settings. Anyway now it works and hopefully other Gnome-only users can find
this post and resolve similar problems.
--
View this message in context: http://www.nabble.com/Period-key-in-numeric-keypad-doesn%27t-act-as-a-decimal-separator-in-my-locale-tf1685579.html#a13238355
Sent from the kmymoney2-developer mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
Loading...