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

F4 and F11 cannot be binded #1296

Closed
lip8up opened this issue Apr 1, 2017 · 2 comments
Closed

F4 and F11 cannot be binded #1296

lip8up opened this issue Apr 1, 2017 · 2 comments

Comments

@lip8up
Copy link

lip8up commented Apr 1, 2017

This cannot work:

hs.hotkey.bind({}, 'f11', function() ... end)

But this can:

hs.hotkey.bind({}, 'f12', function() ... end)

And this also can:

hs.hotkey.bind({'cmd'}, 'f11', function() ... end)

Thanks!

@asmagill
Copy link
Member

asmagill commented Apr 1, 2017

hs.hotkey.bind cannot override system defined shortcuts. Check System Preferences->Keyboard->Shortcuts to see if you have F11 assigned to something, e.g.

screen shot 2017-04-01 at 1 56 33 pm

I've noticed that it can be inconsistent about reporting an error about this, but even when no error is returned, it won't prevent the system version from being triggered instead of ours.

@lip8up
Copy link
Author

lip8up commented Apr 2, 2017

Thank you very much! My problem has been solved.

I found when I just set the shortcut of the Mission Control as F4, but I don't check the check box to enable it, it also takes up the F4, then, cause the hs.Hotkey.bind for F4 cannot work!

image

When I enable it, change it to another key, re-disable it, reload the Hammerspoon, and hs.Hotkey.bind for F4 can work

image

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

2 participants