Bug 167208

Summary: Seems to be assuming a US English keyboard layout where as I have a German keyboard with German layout.
Product: [Applications] kcalc Reporter: Sandipan Mohanty <sandipan.mohanty>
Component: generalAssignee: Evan Teran <evan.teran>
Status: RESOLVED FIXED    
Severity: normal CC: bicave, david, evan.teran, ivo, Oliver, vmpereir
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Sandipan Mohanty 2008-07-22 13:29:21 UTC
Version:           2.2 (using 4.1.00 (KDE 4.0.99 (4.1 RC1+)) "release 13.3", KDE:KDE4:Factory:Desktop / openSUSE_11.0)
Compiler:          gcc
OS:                Linux (i686) release 2.6.25.9-0.2-pae

Kcalc seems to be unaware of the keyboard and keyboard layout I am using. I have a German keyboard, and I use a default German layout. In this keyboard layout, the sign "/" is typed with the combination Shift+7. But in kcalc, to divide 1 by 2, typing "1 Shift+7 2" just shows 12 on the calculator screen. If I pretend that I was using an American keyboard layout, and type the rightmost key on the bottom row for "/", it shows 0.5, the correct result. Somehow, it is looking for the "/" key at the place where an American keyboard has it. On my keyboard, at that place I see the hyphen(minus) or underscore key. It makes no sense for me to use that for division. The same is true for the "+", "-" and "*" keys. Why is this application unaware of the KDE keyboard layout settings ? 

I have two alternative layouts defined, Swedish and American. The locale is set to  English. But kcalc is stuck to an American layout no matter what is seen by all the other applications!
Comment 1 Ivo Anjo 2008-12-08 14:21:38 UTC
This works for me with 4.1.3 and current trunk, and the portuguese keyboard layout "suffers" from the same problem.

Can you still reproduce it?
Comment 2 David Johnson 2008-12-11 06:52:24 UTC
The code defines two shortcuts for division, Qt::Key_Slash and Qt::Key_division. When I switch keyboard layout to German, I get the wrong behavior. This seems to be bug in Qt. I'll inquire with Nokia support.
Comment 3 David Johnson 2008-12-13 06:12:27 UTC
Nokia says it's not a Qt bug. Doing some more investigating, it seems to be the KDE keyboard-layout code. Using kcmshell4 keyboard-layout lets me reproduce this bug, but using setxkbmap and the software works as expected. This isn't a bug with kcalc. I'm filing a new bug on this.
Comment 4 David Johnson 2008-12-13 21:08:18 UTC
Actually I think it is a Qt bug. It's reproducible on all desktops using both kxkb and setxkbmap.
Comment 5 David Johnson 2009-01-19 00:39:55 UTC
Update: This has been entered as a Qt bug, number 239330 in the Nokia tasktracker. http://www.qtsoftware.com/developer/task-tracker/
Comment 6 bicave 2009-04-08 16:01:49 UTC
Hello,

I am having the same problem. KCalc acts as if only the default
keyboard map is being used even though I change the keyboard
map using Ctrl-Alt-K.

I encountered this problem when I was trying to set up global
keyboard shortcuts for increasing/decreasing the volume.

M. Vefa Bicakci

(For the record, I am using the Turkish and English keymaps.)
Comment 7 Médéric Boquien 2009-05-04 06:52:10 UTC
*** Bug 190264 has been marked as a duplicate of this bug. ***
Comment 8 Oliver 2009-12-13 13:22:18 UTC
Hi, I'm using KCalc 2.5 under KDE 4.3.3

I found that I can't use the keys "3" and "9" on the numeric keypad. All other numbers work fine. When pressing 1, 2, 4, 5, 6, 7 or 8 I can see that the number is pressed and it appears in the display. When I press "3" I just get a blue frame around the number "3" and nothing in the display. The same happens with "9". When using the numbers in the top row of the keyboard "3" and "9" work fine.

Is this also caused by the QT bug?

I also noticed that although I'm using a German keyboard layout and KCalc's menu etc. are in German that it still shows a point as decimal separator (.). Using the default German decimal separator "," doesn't work when using the numeric keypad.

When typing a "," (comma) in the bottom row it still shows a decimal point.
Comment 9 Evan Teran 2013-04-16 16:33:36 UTC
Can anyone say if this is still an issue?
Comment 10 Oliver 2013-04-17 05:23:28 UTC
(In reply to comment #9)
> Can anyone say if this is still an issue?

For me all above issues are solved (using KCalc 2.13 on KDE 4.10.1).