Shift agruments in `hotkey.new`
minhtung0404 opened this issue · comments
minhtung0404 commented
If I understand correctly, if I put explicitly message = nil
in the function call then it still shift the arguments, which might lead to unexpected behavior. For example if I call hotkey:bind(mods, key, nil, f1, f2, f3)
, it shift pressedfn
to nil, releasedfn
to f1 and repeatfn
to f2.
if message==nil or getFunc(message) then
repeatfn=releasedfn releasedfn=pressedfn pressedfn=message message=nil -- shift down arguments
end