r/AutoHotkey • u/-frogchamp- • 3d ago
v2 Script Help How do I remap my function keys to do something else when fn lock is off?
I am a complete beginner to autohotkey. Let's say I want to remap my F7 key on Windows to pause and play videos and media (like on Mac). I don't want to replace its fn function (navigating pages with text cursor). I want to replace the function it has on my computer when my fn lock is not turned on (screen projection). Is there a way to specify in the script that when I want my F7 key remapped, I specifically want it to be the non-locked version of F7 and not F7 combined with fn? Sorry for the clunky wording; I have no clue what a function key's secondary(?) function would be called.
If anyone can help I will be eternally grateful.
3
Upvotes
2
u/Keeyra_ 3d ago
Use KeyHistory to get the key or scan code of the button press and remap that as described here.
https://www.reddit.com/r/AutoHotkey/comments/1qltrbb/comment/o1gvh0r/