View Issue Details

IDProjectCategoryView StatusLast Update
0002959Spring engineLuapublic2013-01-22 16:48
ReporterJools Assigned ToKloot  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version85.0 
Summary0002959: Key events captured wrong for alt and altgr keys
DescriptionI 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 InformationTested 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.
TagsNo tags attached.
Checked infolog.txt for Errors

Relationships

related to 0002999 closedjK keys not working 

Activities

SirMaverick

2012-02-16 22:23

reporter   ~0008295

> When I release left alt, I get no results.

You have to return true in KeyPress to get the KeyRelease event.

abma

2012-03-03 04:24

administrator   ~0008380

thanks SirMaverick.

@jools:
does it work with the suggested changes?

Jools

2012-04-16 06:35

reporter   ~0008625

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.

Issue History

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