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 134540 - keyboard's numeric keys do not work
keyboard's numeric keys do not work
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
unspecified
Other Linux
: Normal major
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2004-02-16 16:23 UTC by Filippo
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4


Attachments
Proposed fix for the problem. (4.43 KB, text/plain)
2004-02-18 16:08 UTC, Rich Burridge
Details

Description Filippo 2004-02-16 16:23:25 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
Comment 1 Rich Burridge 2004-02-17 17:36:34 UTC
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...
Comment 2 Rich Burridge 2004-02-18 16:08:17 UTC
Created attachment 24519 [details]
Proposed fix for the problem.
Comment 3 Rich Burridge 2004-02-18 16:23:54 UTC
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.