GNOME Bugzilla – Bug 134540
keyboard's numeric keys do not work
Last modified: 2004-12-22 21:47:04 UTC
I cannot enter numerical data in gcalctool by using the upper raw of numerical keys on my laptop (azerty french keyboard). When I use the pseudo numerical keypad with the Fn function, I can enter numerical data in gcalctool. echo $LANG provides the following output en_US.UTF-8. export LANG=fr_FR ; gcalctool does not provide a solution. export LANG=en_US ; gcalctool neither Computer: Dell D800 laptop. Thanks for your work, Filippo
If you have the ability to compile gcalctool, it would help if you could add the following line to the check_vals() routine in gtk.c: fprintf(stderr, "cv: n: %d keyvals: %d state: %d\n", n, keyvals, state); just before the: state = state & ... line and recompile gcalctool and run it again, noting what key you were pressing for each line of output. The way that gcalctool works is that it has a set of keyval and state values it recognizes for each calculator button. For example, for the digit "1", it recognizes: { 0, 0, 0, 0, 0 }, /* state */ { GDK_1, GDK_KP_1, GDK_KP_End, GDK_R13, 0 }, /* keyval */ See about line 308 in calctool.c. Now I'm suspecting that for your keyboard layout, none of the above match. Perhaps you have to hold the Shift key down to enter a 1, in which case we would have to add a new state/keyval entry of: GDK_SHIFT_MASK GDK_1 /* or whatever keyval is output */ to correctly capture this. And so on...
Created attachment 24519 [details] Proposed fix for the problem.
I've checked into CVS HEAD what I believe is the fix, and I've closed out the bug. If this doesn't fix it for you, please just reopen it, and let me know where I screwed up. I've also bumped the version number in configure.in to 4.3.46.Thanks.