GNOME Bugzilla – Bug 101225
Translation of KP_Decimal should be locale dependent
Last modified: 2011-02-04 16:11:56 UTC
Keyboards in Europe tend to have , on the numeric keypad, not ., but the key still produces KP_Decimal as the keysym. GDK probably should translate KP_Decimal differently depending on the current LC_CTYPE setting. (See g_ascii_strtod for an example of the use of localeconv... seems to be portable to Windows.)
a) LC_NUMERIC setting, not LC_CTYPE b) This refers to the functions in gdkkeyuni.c
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=50282 has some info on what layouts are affected. These include Sweden, Finland, Denmark, Netherlands, Norway, Switzerland, Germany. Perhaps there are more but these are the ones I could verify.
We can't do anything based on the keyboard layout ... either the keyboard layout tells me what the key is (uses comma, period), or we have to go based on the information we do have ... the locale.
Yeah, that's why I think basing the characters entered on the locale is wrong to begin with - the characters should simply match the characters printed on the keyboard keys.
Well, that's a question of X configuration; as long as KP_Decimal is being used, the translation should depend on the locale. Wed Jan 29 17:02:41 2003 Owen Taylor <otaylor@redhat.com> * gdk/gdkkeyuni.c (get_decimal_char): Make the translation of GDK_KP_Decimal dependent on LC_NUMERIC. (#101225)