Version: 2.7 (using KDE 4.5.1) OS: Linux When I click -5 in kcalc it shows as 5 and only when I press = will it show as -5. This is horrible as when I type -5+2 it doesn't show the sign and will be left wondering whether I have pressed the negative sign. Please show the negative sign when I have typed. Reproducible: Always Steps to Reproduce: type - and 5 Actual Results: you only see 5 Expected Results: It is expected to see -5 LP #668020: https://bugs.launchpad.net/ubuntu/+source/kdeutils/+bug/668020
I believe that you are pressing the subtract button "-", then 5, then equals "=". That is actually not the correct way to create negative number! What that does is take the current value (0 when you start the calculator), then subtracts 5 from it when you hit equals. Which of course results in negative 5. The correct way to input a negative number is instead to enter the value you want (5) and then to use the "+/-" button (located in the lower right in all modes). This will immediately toggle the sign of the value. So, if you wanted to calculate "5 * -10", you would press the following keys: 5 x (multiply) 10 +/- = I hope this helps.
I try not to press number but use my keyboard, which does not have a "+/-" key. So to type "-5", I type "-" and "5" which indeed acts as "-5", since I can continue typing "+", "2" and "=" to get the correct result "-3". The 'problem' is that I do not see "-5" when I type "-" and "5", which would be the expected output. Especially since kcalc acts correctly as if "-5" is present.
If you want to toggle the sign using the keyboard, use the \ key. Tip: Hold Ctrl to see the keyboard shortcuts.
See also bug 240082 comment #9.
@Maarten Bezeme, When type the keyboard keys: "-5+2=", you are actually telling kcalc to calculate: "0-5+2=". Christoph Feck offers the correct keyboard solution. It is possible that "\" is not the best keyboard shortcut for "invert sign", but that's a different discussion.