Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shift agruments in hotkey.new #3604

Open
minhtung0404 opened this issue Feb 21, 2024 · 0 comments
Open

Shift agruments in hotkey.new #3604

minhtung0404 opened this issue Feb 21, 2024 · 0 comments

Comments

@minhtung0404
Copy link

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

link to code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant