How to use the calculator:
General usage
Input limitations:
- The expression can start with a number, a minus sign or a dot.
- If the expression starts with a minus sign only numbers or dot can follow. Minus sign can be removed with '±' button.
- After the zero that starts a number in the expression only the dot can follow.
- After the dot only numbers can follow.
- After the operation sign, only numbers and the dot can follow.
- If the last input is the operation sign, pressing another operation will replace the previous one. Current operation is indicated in the top left corner of the display.
- If the last operation sign is '*' or '/', for multiplication and division with negative numbers a minus can be toggled with '±' button. The minus sign is displayed after the '*' or '/' sign.
- If the last operation sign is '+' or '-', using the '±' button will toggle the sign of the operation.
-
Using the '±' toggle behaves different according to the expression:
- If the last character in the expression is an operation sign, it toggles the sign of the next number to input.
- If the last character in the expression is a digit, the expression is evaluated and then the evaluated expression is displayed with the changed sign. In other words, the '±' toggles the sign of the whole expression.
- The 'DEL' button deletes the last character from the expression.
- The 'C' button clears the whole expression.
- The '=' button evaluates the expression and displays the result on the calculator display.
Keyboard bindings
Operating the calculator with the mouse is straightforward, you just click the buttons with it. But it is possible to operate it with the keyboard by using the following key bindings:
Calculator key |
Keyboard binding key |
= |
Enter |
DEL |
Backspace |
C |
Delete |
± |
Shift + - |
Other buttons |
The corresponding buttons on the keyboard |
Warning!
Don't mix the source of the input (mouse - keyboard) during one computation because it may lead to some buggy behavior. I was not able to sort it out. In general, pressing 'Enter' can sometimes change the sign of the result, but some other problems might occur too.
Disclaimer
This is my learning project. Under no circumstances is this calculator to be considered reliable for serious calculations. Use it just for fun. I will not be held responsible for any damage that using this calculator may cause.