Emulate Fn key press using keybd_event API or sendkeys class

1.9k Views Asked by At

I have a Fn key on my USB keyboard which allows me to enable certain features on my keyboard. So, if I press Fn + F10, the keyboard will switch to a different mode.

I have a feeling it's possible that Windows has no access to the Fn on my keyboard. However, I thought maybe there may be some undocumented way of triggering this key for keyboard that have a Fn key (like laptops, etc).

1

There are 1 best solutions below

0
On

Basically, no you can't emulate it.

Keyboards work by sending standard scan codes to the PC. On a regular keyboard each key is mapped to a scan code. There is no scan code for the fn button, instead it tells the keyboard to change the scan code it sends in response to a given key press. E.g. on my laptop the home button normally sends the scan code for home, but if I press the Fn key as well it sends the scan code for print screen. It is deliberately transparent to the operating system.