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

some keys trigger the FN modifier flag for some reason #10

Closed
koekeishiya opened this issue Sep 24, 2017 · 6 comments
Closed

some keys trigger the FN modifier flag for some reason #10

koekeishiya opened this issue Sep 24, 2017 · 6 comments

Comments

@koekeishiya
Copy link
Owner

koekeishiya commented Sep 24, 2017

Events triggered by keys such as all function keys (f*), and the arrow keys have the fn modifier flag set for some reason, even though the fn modifier is not pressed. The same is true even with the mission control option "Use F1, F2, etc keys as standard function keys".

It is tedious to have to manually specify fn as a modifier in these binds.
An option is to automatically flag binds using these literals with the fn modifier during parsetime,
however this could make it unclear to the users that these literals CAN NOT be used with fn as a modifier. e.g:alt - left and fn + alt - left are equivalent.

@ArnaudValensi
Copy link

I try too bind fn + arrow but skhd also trigger when we just do arrow. Is there a way to make it work?

@koekeishiya
Copy link
Owner Author

fn + arrow is not possible, because the arrow key-event already implicitly has the fn-flag set.
You can see a list of literals that work and don't work with the fn-mod here: #1

This is a part of macOS keyevents that we can not do anything about, sadly.

@dominiklohmann
Copy link

fn + left / right / up / down is translated to home / end / pageup / pagedown respectively by macOS.

home     : terminal-notifier -message "fn-left"
end      : terminal-notifier -message "fn-right"
pageup   : terminal-notifier -message "fn-up"
pagedown : terminal-notifier -message "fn-down"

@koekeishiya might wanna catch this in code and remap it?

@ArnaudValensi
Copy link

Ok, I got it, thank you!

@pkieltyka
Copy link

im looking to setup my caps lock key are my primary modifier to control most of chunk via skhd --

is it possible to use capslock as a hyper key somehow? perhaps https://github.com/tekezo/Karabiner-Elements can help otherwise..

@pkieltyka
Copy link

pkieltyka commented Sep 15, 2018

btw, I just tried it and can confirm that Karabiner Elements is a great combo with skhd. I set caps lock to my hyper key via https://gist.github.com/lunelson/69d041356f90bc0974e22d2a1fb0b059 and now, I can control everything with caps lock as my mod key

unfortunately its not perfect though, as you can't create a modifier combo of: hyper + cmd - left for example, as hyper consists of the cmd modifier already selected, so hyper - left is the same as the above. Too bad there isn't a way to have the OS add an additional modifier key under some unused code, remap caps lock to it, and then have skhd use that new and fresh modifier key and work along side the other modifier combos

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

No branches or pull requests

4 participants