I want to use Fn+S to emulate Ctrl+S, so far this is my code:
#InstallKeybdHook
#Persistent
SC126 & s::
Send ^{s}
return
My problem is that I don't know the Fn
key's scan code.
How can I find it?
A scancode (or scan code) is the data that most computer keyboards send to a computer to report which keys have been pressed. A number, or sequence of numbers, is assigned to each key on the keyboard.
To enable it, we'd hold Fn and press the Esc key. To disable it, we'd hold Fn and press Esc again. It functions as a toggle just like Caps Lock does. Some keyboards may use other combinations for Fn Lock.
Each key press and key release produces between 0 and 6 scancodes.
Select the Enabled option to require only the F1 through F12 keys to use the action as indicated on the action key, without having to press the Fn key itself. Press the F10 key again to save the changes, and restart your device.
The Fn
key does not have a scan code.
The keyboard driver does not expose the Fn
key to the operating system, so basically your operating system (and therefore AutoHotkey) does not know that it exists.
When you press the Fn
key in combination with a supported key, the keyboard driver reports a single key press to the operating system with a different scan code. Basically, it tells the operating system that a different key was pressed.
When you press the Fn key in combination with a supported key, the keyboard driver reports the presses to the operating system.
You can find the fn key scan code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With