Closed rcarmo closed 2 years ago
Unfortunately, I’m pretty sure the Carbon events used for hot keys did not support “fn” as a modifier. The event referred is for the regular key events.
It looks like the Fn key is assignable these days in the macOS Preferences but only basic re-mapping like other modifiers or No Action. Ideally No Action would allow for control in Phoenix but it's probably not possible :(.
@rcarmo As a work-around, you could try using Karabiner-Elements to map fn
to something like f19
(possibly also set No Action for it in macOS preferences). However, f19 is a key, not a modifier, so there are two options:
Re 2., I've done this in the past and it works OK, there is and edge-cases / timing issue though where the modifiers will be active for a bit longer than ideal. This is because the timeouts need to be ~matched to key-repeat events (IIRC there's no observable key released event which would eliminate the timing issue). To improve this, the macOS key-repeat / duration before repeat can be decreased to make it work better. What you'd do is essentially:
https://github.com/mafredri/phoenix-config/blob/b8dad65c6ddcb197706f2545bdd259d82b2af11b/src/key.ts
@mafredri Thanks for giving some options! 🙂
It would be nice to have
Fn
(kCGEventFlagMaskSecondaryFn
) as a modifier key as well (I'm running out of modifiers).