Qalculate / qalculate-qt

GNU General Public License v2.0
359 stars 41 forks source link

Qt UI: difficulty entering the 'degrees' symbol ° with German keyboard layout on Windows #158

Open Tomalak opened 2 weeks ago

Tomalak commented 2 weeks ago

This affects the Qt UI version only.

Environment:

Qalculate 5.2.0 on Windows 10 22H2 (build 19045), system language is "English (United States)" with a "German (IBM)" QWERTZ keyboard layout.

In the German keyboard layout, the degrees symbol is in the top left corner on the combined key. German keyboard layout map

On this keyboard, the circumflex is a dead key that needs a second key press to actually render the ^, e.g. pressing and then a produces â.

Expected behavior:

Actual behavior:

hanna-kn commented 2 weeks ago

I have established that this is caused by a workaround which try to achieve the same behaviour as in the Gtk version (where ^ is always input directly, without affecting behaviour with shift, to simplify exponentiation).

I will either fix or remove the attempt (which in other cases does not work at all) to enable direct input of caret using dead circumflex key.

hanna-kn commented 2 weeks ago

I've now figured out that the issue was caused by the fact that Shift+ is reported by Qt as a non-dead circumflex key press with shift as modifier. The expected behaviour is that a degree key press with shift is reported.

Tomalak commented 2 weeks ago

Awesome, thank you! :)

This seems like a bug in Qt, doesn't it?

hanna-kn commented 2 weeks ago

This seems like a bug in Qt, doesn't it?

I'm unsure where the cause of the behaviour is. On GNU/Linux the expected degree key is reported for the key press event. The degree key works as expected on both platforms with Swiss keyboard layout. In all cases the input text is correct (°) for the event.