Open jaseknighter opened 11 months ago
hmm, i can reproduce this. i also think this is an SDL issue that would be tough for me to dodge in comparison with the ease of a workaround at the script level: if you manage the state of lalt
yourself, for example, you can discard the double triggers. i'll leave this open for when we ditch SDL.
i can reproduce as well.
fwiw, the is_repeat
flag is set to true
to the 2nd call. the culprit keys are only the modifier keys and those are not supposed to repeat so using not is_repeat
as an additional condition makes it easy to filter out those crappy calls.
some modifier keys on mac os (lsuper, lctrl, lalt) return values twice on press. on release, values only return one time as expected. this only happens with some modifier keys. shift and enter don't have this issue, for example.
here is sample output using this code
screen.key = function (char, modifier, is_repeat,state) print("char,char.name,modifier[1]: ",char,char.name,modifier[1],state) end
: