After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 555522 - Problem with KP_DECIMAL
Problem with KP_DECIMAL
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: Win32
2.14.x
Other Windows
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2008-10-08 10:37 UTC by olivir
Modified: 2018-04-15 00:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add VK_DECIMAL (626 bytes, patch)
2008-10-15 00:23 UTC, Jody Goldberg
none Details | Review
keypad decimal key in the goel seek tool (10.58 KB, image/png)
2009-02-25 13:07 UTC, olivir
  Details

Description olivir 2008-10-08 10:37:30 UTC
Hello everybody,

On win32, the KP_SEPARATOR on the numpad doesn't write the correct separator of my regional options.

It writes a "." though in France, I need a ",".

My regional options seems correct : http://www.zimagez.com/zimage/capture-1121.php
Comment 1 Jean Bréfort 2008-10-08 15:13:18 UTC
what is the result of =getenv("LANG")?
Comment 2 Morten Welinder 2008-10-09 13:47:38 UTC
What does the key insert when you use it in a text field?  (Use the Find
dialog for testing, for example.)
Comment 3 Jean Bréfort 2008-10-09 18:29:51 UTC
it inserts a dot, which, in that case is the normal behavior, imho. I can reproduce this bug, but I don't understand why it occurs. It would probably some debugging I'm not able to do on win32.
Comment 4 Morten Welinder 2008-10-09 23:46:32 UTC
If it inserts a dot in a text field, doesn't that tell us that gtk+ is
at fault?
Comment 5 Jean Bréfort 2008-10-10 06:15:14 UTC
I'm not sure, but I'm suspecting gdk or gtk. But I could not find why. gdkkeys-win32.c maps VK_SEPARATOR to GDK_KP_Separator which is correct.
Comment 6 Jody Goldberg 2008-10-14 12:07:24 UTC
Gdk is indeed returning 46 rather than KP_Separator
Comment 7 Jean Bréfort 2008-10-14 12:58:35 UTC
Looks like we need to test the hardware code when gdk returns 46 (win32 only, of course). Unless it can be fixed in gdk, but I doubt.
Comment 8 Morten Welinder 2008-10-14 15:48:02 UTC
Testing hardware codes is a lost cause.  They can and will change between
keyboards.  Any reason why this could not be fixed in gdk?  (Beyond the
general bug-fixing-is-boring attitude over in gdk land.)
Comment 9 Jean Bréfort 2008-10-14 20:08:51 UTC
Well the key returning KP_DECIMAL has a hardware code generally > 80 while the dot is < 60 or so. I would, of course, prefer a fix in gdk. As I don't have any documentation on the win32 API, I can't make a patch. That's why I propose a hack which, as bad as it is, should work for most users.
Comment 10 Jody Goldberg 2008-10-15 00:23:50 UTC
Created attachment 120612 [details] [review]
Add VK_DECIMAL

VK_SEPARATOR is in there, but VK_DECIMAL is missing.
Adding it does the right thing on my keyboard.
Comment 11 Tor Lillqvist 2008-11-11 13:42:27 UTC
Oddly enough, *without* this patch, when I type the keypad decimal key, I get a comma (which *is* the correct decimal sign in my locale). With this patch, I get a point. This is in a GTK+ text entry field. In testgtk's spinbutton test, without this patch, the keypad decimal key works and inputs a comma. With this patch, nothing happens when I type it.

I am confused...

Jody, when you say "the right thing", I assume you mean in a locale where the decimal separator is a point, and the key is labeled with a point?
Comment 12 Tor Lillqvist 2009-01-12 10:19:47 UTC
Can anybody confirm (or disagree with) what I say in the previous comment?
Comment 13 olivir 2009-02-25 13:07:55 UTC
Created attachment 129484 [details]
keypad decimal key in the goel seek tool

Hi everybody,

I use the gnumeric-1.9.4-20090205-debug win32 version from jody.

On every cell or GTK text widget, when I press the keypad decimal key, I obtain a "," wich is correct for my locale.

But I noticed that it doesn't work in the Goal Seek Tool, I still have a "." when I expect a "," from the keypad (cf.attachment).
Comment 14 Jean Bréfort 2009-02-25 13:26:24 UTC
The Goal Seek Tool use pure GtkEntry widgets for which KP_DECIMAL seems to be translated to '.' at least in french locale, on *nix as well as win32, AFAIK.
Comment 15 Tobias Mueller 2010-03-21 14:02:32 UTC
Jody, Jean, Olivir, could anybody comment on Tors question in comment 11? TIA!
Comment 16 Jean Bréfort 2010-03-21 14:27:20 UTC
Not sure what Jody meant, but what is certain is that in French locale, without patching gtk+, the decimal separator key from the numpad returns code 46, not KP_DECIMAL on win32. So, in a locale where the decimal separator is a comma, you can't use that key when typing decimal numbers. Quite strange that Tor sees exactly the inverse behavior.
Comment 17 Tobias Mueller 2010-05-16 09:54:14 UTC
Hm. Reopening as per last comment.
Comment 18 olivir 2011-02-11 14:40:16 UTC
No piece of news about resolving this annoying bug on win32 ?
Comment 19 Morten Welinder 2011-02-11 17:20:16 UTC
(Trying to undo clearly-intended changes to product, etc.)
Comment 21 Matthias Clasen 2018-02-10 05:08:49 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 22 Matthias Clasen 2018-04-15 00:32:43 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new