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 526671 - Unable to use the "*" key to make a multiplication
Unable to use the "*" key to make a multiplication
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
5.22.x
Other All
: Normal normal
: ---
Assigned To: Robert Ancell
gcalctool maintainers
Depends on:
Blocks:
 
 
Reported: 2008-04-07 08:32 UTC by Christophe Sauthier
Modified: 2008-04-09 00:20 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Christophe Sauthier 2008-04-07 08:32:20 UTC
Please describe the problem:
This bug has been reported here : https://bugs.edge.launchpad.net/ubuntu/+source/gcalctool/+bug/212274
------
I use my keyboard to type into gcalctool. Every key work, but the "*" key : nothing happens when I type it, and I have to click on the "*" button manually in order to make a multiplication. There is no problem with "/", "+", "-". Tried with both compiz-fusion enabled and disabled, and it didn't change anything.
-------

It has been confirmed by many users and myself too.
I'm using a laptop computer (Dell Vostro 1500) with a french AZERTY keyboard without keypad. I didn't try with other types of keyboard.

Steps to reproduce:
Simply type * on your keyboard. 


Actual results:
Nothing happens.

Expected results:
*

Does this happen every time?
yes

Other information:
In fact this bug depend on the keyboard of type : I have the internal of my laptop where the bug is reproduced. Using an external one everything works fine. May be it is related to the same kind og bug than the one with the '('...
Comment 1 Christophe Sauthier 2008-04-07 08:32:52 UTC
Of course if you need any help on that I can test many combinaisons of key strokes...
Comment 2 Christophe Sauthier 2008-04-07 08:33:57 UTC
it might be interesting that it seems to appear on french keyboards...
Comment 3 Rich Burridge 2008-04-07 08:53:43 UTC
Where is the "*" key on this keyboard? Is it a "lower" case key
or an "upper" case key?

In gtk.c, about line 225 there is a chunk of code that currently looks like:

    {KEY_MULTIPLY,           "multiply",
    { GDK_SHIFT_MASK, 0,               0,      0 },
    { GDK_asterisk,   GDK_KP_Multiply, GDK_R6, 0 }},

Try adjusting one or both of the first two entries to be like:

    {KEY_MULTIPLY,           "multiply",
    { 0,              GDK_SHIFT_MASK,  0,      0 },
    { GDK_asterisk,   GDK_KP_Multiply, GDK_R6, 0 }},

Tell us which one worked (if either) for you, then that entry 
can be added to that chunk.
Comment 4 Christophe Sauthier 2008-04-07 09:08:20 UTC
Dear Rich,

I've just tried your fix :

{KEY_MULTIPLY,           "multiply",
{ 0,GDK_SHIFT_MASK, 0,      0 },
{ GDK_asterisk,   GDK_KP_Multiply, GDK_R6, 0 }},

and it works fine ! Thanks.

For your information it is a lower case key.

On the other hand I've just tried the / for divide, and it seems buggy too....
Comment 5 Robert Ancell 2008-04-07 11:01:37 UTC
Mutliply bug fixed for 2.22.1:
http://svn.gnome.org/viewvc/gcalctool?view=revision&revision=2051
Comment 6 Robert Ancell 2008-04-07 11:02:05 UTC
Actually thats revision 2050 for 2.22.1, 2051 for head.
Comment 7 Robert Ancell 2008-04-07 11:18:11 UTC
Christoph,

Could you add the following to the start of kframe_key_press_cb() in gtk.c and report any keys that should work but don't:
printf("key event, state=0x%x, keyval=0x%x\n", event->state, event->keyval);

Cheers,
--Robert
Comment 8 Christophe Sauthier 2008-04-07 12:02:25 UTC
Hello Robert,

So far (once I have applied the patch that Rich attach in that bug) the only key that seems to bug, is /

the code I get with a buggy keyboard is :
key event, state=0x11, keyval=0xff9f

I hope that'll help.

Let me know if you want anything else...

Cheers,

      Chris
Comment 9 Robert Ancell 2008-04-07 12:52:50 UTC
According to my copy of /usr/include/gtk-2.0/gdk/gdkkeysyms.h 0xff9f is the keypad delete button with shift (0x01) and MOD2 (0x10) (see /usr/include/gtk-2.0/gdk/gdktypes.h).

Please check if your version confirms this. Does it print the correct character in other programs?
Comment 10 Christophe Sauthier 2008-04-07 13:02:52 UTC
Ok, it was my mistake... Since I am using an external keyboard most of the time, numlock was on, and thus I cannot get the '/' on my laptop initial keyboard.

You can forget was I was mentionning about the '/'.


BTW I cannot find such a file (gdkkeysyms.h) on my computer (running ubuntu hardy).


Comment 11 Christophe Sauthier 2008-04-07 13:05:41 UTC
So there is only a need of a patch for the '+'.

Will you include it in the next version (5.22.1) which is due to arrive this week (as far as I remember). Or do I need to include a patch for the ubuntu version ? (like it was the case with the '(' ) ?

Thanks for your answer.
Comment 12 Robert Ancell 2008-04-07 23:54:47 UTC
The multiply fix is present in 5.22.1:
http://svn.gnome.org/viewvc/gcalctool/tags/GCALCTOOL_5_22_1/gcalctool/gtk.c?revision=2056&view=markup

Is there an addition problem as well?
Comment 13 Christophe Sauthier 2008-04-08 08:14:50 UTC
Thanks Robert for the inclusion.

I have tested the multiply in 5.22.1 and it works fine.

And no there is no problem with the addition... It was my mistake...
Comment 14 Robert Ancell 2008-04-09 00:20:26 UTC
No problem, closing.