View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0009394||Lazarus||LCL||public||2007-08-06 20:01||2009-11-29 22:45|
|Reporter||Valdas Jankūnas||Assigned To||Marc Weustink|
|Product Version||0.9.23 (SVN)|
|Target Version||1.0.0||Fixed in Version||0.9.27 (SVN)|
|Summary||0009394: Keyboard Alt shift state differs in KeyDown/Up events|
|Description|| Shift state for Alt key differs from Ctrl and Shift keys.|
If i press only Shift or Ctrl or Alt key then in OnKeyDown i get:
(ssShift in Shift)=True for Shift key, and
(ssCtrl in Shift)=True for Ctrl key, and
(ssAlt in Shift)=False for Alt key.
And if i release that key then in OnKeyUp i get:
(ssShift in Shift)=False for Shift key, and
(ssCtrl in Shift)=False for Ctrl key, and
(ssAlt in Shift)=True for Alt key.
And that make another question: when i press Alt or Shift or Ctrl key then that key should be included in shift state in OnKeyDown (and excluded in OnKeyUp)?
I also uploaded test app.
|Tags||No tags attached.|
|Fixed in Revision||20767|
|Widgetset||GTK, GTK 2|
temp_02.zip (2,673 bytes)
The only "strange" thing I see is:
- After pressing Ctrl only or Shift only, the label is updated immediatly.
After pressing Alt, there is a slight delay before updating the label, as if the keyboard handler was waiting for another key before sending the message. So pressing Alt only and releasing the key quickly sometimes does nothing.
- After pressing Alt for a moment (a few seconds), I always get the right message, but the keybaord handler seems to "eat" the following keys, until i press Alt again or I click on the form.
When releasing the key, all Shift, Alt and Ctrl appear to be false.
I've tested the app with Delphi 7, and it works exactly in the same way, so to me it all looks normal.
(Win XP Spanish SP2)
Is there something I am missing?
||<shame> Yes It looks like I missed it was about GTK. </shame>|
||Implemented own way of tracking shiftstates, now ssAlt is reported when pressed, similar to delphi|
Now (Laz rev 20773, fpc ver 2.2.4) when I first press SHIFT key and then press ALT key then in OnKeyDown i get (ssAlt in Shift)=False, also I get False in OnKeyUp when I release ALT key. Not good.
Also appeared another problem: first press ALT, then press SHIFT, then release ALT, ant then release SHIFT. After this sequence when I press or release any another key then in OnKeyDown or OnKeyUp events (ssAlt in Shift) always reported as True.
I tested this in Kubuntu 9.04 (updated) with KDE 4.2.4, also in Arch 2009.02 (updated) with xfce runing as guest OS in VirtualBox ver 2.2.4.
These two problems not appeared in Laz rev 20700 (quick choose).
Combination CTRL + ALT works OK in fixed rev.
No problems in gtk2 (Lazarus r22855, Kubuntu 9.10 32bit). Cannot test in gtk1, because lack of needed packages (libglib, ...) in repo
Thanks for retesting with gtk2.
No need to test with gtk1 after:
||I must Close this bug or leave as is?|
If you want it to be fixed for gtk1, open a new issue for gtk1 *with* patch.
|2007-08-06 20:01||Valdas Jankūnas||New Issue|
|2007-08-06 20:01||Valdas Jankūnas||File Added: temp_02.zip|
|2007-08-06 20:01||Valdas Jankūnas||Widgetset||=> GTK|
|2007-08-06 21:29||Vincent Snijders||LazTarget||=> 1.0|
|2007-08-06 21:29||Vincent Snijders||Status||new => acknowledged|
|2007-08-10 10:15||Gerard V||Note Added: 0014066|
|2007-08-10 10:16||Gerard V||Note Added: 0014067|
|2008-04-24 09:57||Vincent Snijders||Target Version||=> 1.0.0|
|2009-06-30 00:54||Marc Weustink||Fixed in Revision||=> 20767|
|2009-06-30 00:54||Marc Weustink||Widgetset||GTK => GTK, GTK 2|
|2009-06-30 00:54||Marc Weustink||Status||acknowledged => resolved|
|2009-06-30 00:54||Marc Weustink||Resolution||open => fixed|
|2009-06-30 00:54||Marc Weustink||Assigned To||=> Marc Weustink|
|2009-06-30 00:54||Marc Weustink||Note Added: 0028864|
|2009-06-30 00:55||Marc Weustink||Fixed in Version||=> 0.9.27 (SVN)|
|2009-07-01 16:05||Valdas Jankūnas||Status||resolved => assigned|
|2009-07-01 16:05||Valdas Jankūnas||Resolution||fixed => reopened|
|2009-07-01 16:05||Valdas Jankūnas||Note Added: 0028892|
|2009-11-29 01:42||Valdas Jankūnas||Note Added: 0032569|
|2009-11-29 02:55||Valdas Jankūnas||Note Edited: 0032569|
|2009-11-29 13:14||Vincent Snijders||Status||assigned => resolved|
|2009-11-29 13:14||Vincent Snijders||Resolution||reopened => fixed|
|2009-11-29 13:14||Vincent Snijders||Note Added: 0032572|
|2009-11-29 16:57||Valdas Jankūnas||Note Added: 0032576|
|2009-11-29 19:58||Vincent Snijders||Note Added: 0032579|
|2009-11-29 22:45||Valdas Jankūnas||Status||resolved => closed|