Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2007-09

Key problem

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Paul Ishenin

Hello, Items specific to the Qt widget set.

I am ivestigating one bug in qt ide. When I press [Ctrl + Shift + 1]..[Ctrl + Shift + 9] editor adds bookmark. But this doesnot happen when I press [Ctrl + Shit + 2]. Debugging show me that in that case Qt returns QtKey_At instead of QtKey_2. I am just curious is that bug of qt itself or bindings? Den, please check.

Best regards, Paul Ishenin.
Den Jean
to Paul Ishenin
Paul Ishenin wrote
when I press [Ctrl + Shit + 2]. Debugging show me that in that case Qt returns QtKey_At instead of QtKey_2. I am just curious is that bug of qt

Everything as expected no :-; Read The Docs.
(I admit I was surprised aswell).

QKeyEvent::key returns the Key Name, regardless of the modifiers, such as shift. But the problem is that shift changes the the returned keys names :-). So when shift is pressed, the same key may return KeyAt or "2" or another key Exclam and "1". In the same way, the same key return QtKey_P, there is no different definition for "p" and "P".

Den Jean
to Paul Ishenin: Hello, Items specific to the Qt widget set. I am ivestigating one bug in qt ide. When I…
Paul Ishenin wrote 8 lines
Hello, Items specific to the Qt widget set. I am ivestigating one bug in qt ide. When I press [Ctrl + Shift + 1]..[Ctrl + Shift + 9] editor adds bookmark. But this doesnot happen when I press [Ctrl + Shit + 2]. Debugging show me that in that case Qt returns QtKey_At instead of QtKey_2. I am just curious is that bug of qt itself or bindings? Den, please check.

I added some code to demo shapedclock keypress for investigation, turned out behaviour is a bit different in windows and linux, see yourself. I have qwerty US keyboard. Probably other keyboards have again other behaviours (shift and caps lock work differently on qwerty and azerty if I remember well, I always use qwerty).