View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0002959 | Spring engine | Lua | public | 2012-02-16 17:39 | 2013-01-22 16:48 | ||||
Reporter | Jools | ||||||||
Assigned To | Kloot | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | closed | Resolution | no change required | ||||||
Product Version | 85.0 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0002959: Key events captured wrong for alt and altgr keys | ||||||||
Description | I have a widget that captures key events. In it I have the following callins: * function widget:KeyPress(key, mods, isRepeat) Spring.Echo("Key down:", key) if key==0x134 then Spring.Echo("Alt down") end end * function widget:KeyRelease(key, mods, isRepeat) Spring.Echo("Key up:", key) if key==0x134 then Spring.Echo("Alt up") end end When I press left alt I get these results: "Key down: 308" and "Alt down" When I release left alt, I get no results. When I press right Alt (AltGr), I get these results: "Key down: 308" and "Alt down" When I release right alt, I get this result: "key up: 306" | ||||||||
Additional Information | Tested with Spring 85.0, latest xta = 9.71. I have windows 7 x64 and a logitech deluxe 250 keyboard. No relevant errors in infolog.txt. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
SirMaverick (reporter) 2012-02-16 22:23 |
> When I release left alt, I get no results. You have to return true in KeyPress to get the KeyRelease event. |
abma (administrator) 2012-03-03 04:24 |
thanks SirMaverick. @jools: does it work with the suggested changes? |
Jools (reporter) 2012-04-16 06:35 |
Hmmm, I tested this a while ago, and if I remember correctly it does work if I return true from that event. However, the complication then is that you can only have one widget/gadget which returns true for the KeyPress of one key, because if I return true then it doesn't process other KeyPress events. |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2012-02-16 17:39 | Jools | New Issue | |
2012-02-16 22:23 | SirMaverick | Note Added: 0008295 | |
2012-03-03 04:24 | abma | Note Added: 0008380 | |
2012-03-03 04:24 | abma | Status | new => feedback |
2012-04-16 01:47 | abma | Relationship added | related to 0002999 |
2012-04-16 06:35 | Jools | Note Added: 0008625 | |
2013-01-22 16:48 | Kloot | Status | feedback => closed |
2013-01-22 16:48 | Kloot | Assigned To | => Kloot |
2013-01-22 16:48 | Kloot | Resolution | open => no change required |