Comment 2 for bug 1480662

Revision history for this message
Niklas Wenzel (nikwen) wrote :

Yeah, I'm sorry for that bad example of using spaces.

While I agree that I'd like the app to accept any input and let the user deal with any of its issues, the calculator app is already very restrictive when it comes to letting users type stuff using a keyboard. If you want to input "sin(" for example, you have to press the "s" key. If you because you're used to it type in "sin" instead, you will end up with "sin(" and "i" being inserted.
Furthermore, there are a lot of other character combinations which are not allowed by the engine. Let's say you type in "5*2.234" but want to change it to "5*2.2+3.4" for whatever reason and start by trying to insert the dot after the "3", the calculator app won't let you. And there are many examples like this one.
That's why I believe we should, even if it's just for consistency, filter the user's input. Otherwise it will be very confusing for everyone. You can't filter the input at one place and then decide not to do it somewhere else.