Inconsistent GUI and keyboard input

Bug #1409485 reported by Ellie on 2015-01-11
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Fix Released

Bug Description

When inputting some characters in calculus, the outcome is different depending on if you used your keyboard or the GUI to input it. This can for example be seen when inputting a * character with the keyboard. While it shows up as a star with no spaces when using the keyboard, it shows up as an x symbol with spaces on either side when using the GUI. This also applies to the / character.
A proposal for a fix to this would be to not have any spaces and then replace all instances of * & / with the correct characters every time a user inputs something.

Related branches

Marvin Beckers (embik) on 2015-01-12
Changed in calculus:
importance: Undecided → Wishlist
Marvin Beckers (embik) on 2015-01-13
Changed in calculus:
assignee: nobody → Tobi (magnontobi)
Ellie (magnonellie) on 2015-01-13
Changed in calculus:
status: New → In Progress
Daniel Fore (danrabbit) on 2015-01-15
affects: calculus → pantheon-calculator
Marvin Beckers (embik) on 2015-02-10
Changed in pantheon-calculator:
status: In Progress → New
Giulio Sant (giulio-sant) wrote :

How can this bug be defined as 'wishlist'? This looks critical to me. I mean, using the num pad to operate a calculator is the number 1 way to go and here key inputs are all off (except for + and -)

Marvin Beckers (embik) wrote :

I don't see any reasoning for using the term 'critical' in this bug's context. Both types of input are perfectly valid to the calculator and I do not believe into hijacking user input for the purpose of consistent display. Most likely you are using one way of input anyway (and not both mixed) and moreover, I assume users who were able to install a Linux distribution are able to recognise both "*" and "×" as the same operator.

Ellie (magnonellie) wrote :

I'm sorry for just bumping in here again after completely abounding this project (sorry for that btw, I realized that I really don't have the time to work on this kind of stuff), but this is something that I have kind of a strong opinion about. "I assume users who were able to install a Linux distribution are able to recognise both "*" and "×" as the same operator"; That is something which I completely despise to hear. If that's the mindset we're going with, how is Linux ever going to reach out to a wider audience? I get your point, sure, but as far as I am concerned, elementary is supposed to be simple, not just for users who's used to Linux, but for everyone.
Never mind that, but in reality, this problem is quite easy to fix. Only reason I didn't manage to is because I'm not used to either vala or gtk. First of, strip the spaces, they just add bloat. Second, catch the keyboard events for when a user inputs an operator and modify it to be the correct style.
Anyway, once again, I don't intend to force you to change this. This is your creation after all and you have all the rights to do whatever you want with it, but these are just my personal opinions.

Changed in pantheon-calculator:
assignee: Tobi (magnontobi) → nobody
Marvin Beckers (embik) wrote :

I'm not really sure if distinguishing basic operator symbols is a particular difficult task. I did not want to refer to a certain mindset, it was just a obvious relation. I'm not forcing people to use the terminal for everything, I'm assuming people listened to their math teachers in school. This should be possible even for a "wider audience". My statement didn't imply other claims.

As mentioned, I refuse to hijack user input for whatever reason . If someone else is willing to write the code, okay, propose it - Merge requests are not processed by myself and therefore I don't decide about it. But I reject to acknowledge this bug as anything else than "wishlist". Just fyi.

Giulio Sant (giulio-sant) wrote :

I'm not questioning the */x inconsistency (though I can't see why rectifying it would be "hijacking"). I'm actually pointing to serious flaws when using the numpad, e.g. when using numbers with decimals you can't actually complete an operation due to the calculator's misintepretation of the period/comma input. Is it a locale issue maybe?

Giulio Sant (giulio-sant) wrote :

Oh, maybe that's what it is:
but it doesn't look fixed here anyway.

Marvin Beckers (embik) wrote :

First of all, this bug is not related to your problem in any form. Claiming it as "critical" ... well, nevermind.

What exactly is your problem? What is your locale settings? Since the branch linked to the bug report mentioned is merged, it now does use the correct decimal mark based on your system settings (for example, on my [German] system it uses ',' now). If it's not fixed for you, your locale settings may be wrong, your system is not up to date or I missunderstood your problem. Anyway, please file a new bug report and give detailed information about your problem and how to reproduce it.

Giulio Sant (giulio-sant) wrote :

Well I gotta say I might have misunderstood my issue since I thought I couldn't really use the numpad in the first place. So I apologise for that. Let me check my locale settings (Italian) and I'll get back to you.

Giulio Sant (giulio-sant) wrote :

My sistem is updated, locale settings look fine, but the issue with decimals persists, that is ' . ' is not interpreted as ' , '

Daniel Fore (danrabbit) on 2015-09-20
Changed in pantheon-calculator:
status: New → In Progress
milestone: none → loki-beta1
Cody Garver (codygarver) on 2016-02-03
Changed in pantheon-calculator:
status: In Progress → Confirmed
Daniel Fore (danrabbit) on 2016-03-24
Changed in pantheon-calculator:
milestone: loki-beta1 → loki-alpha1
status: Confirmed → Fix Committed
Cody Garver (codygarver) on 2016-07-21
Changed in pantheon-calculator:
milestone: loki-alpha1 → loki-beta1
Cody Garver (codygarver) on 2016-08-10
Changed in pantheon-calculator:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers