0

Can you tell me how I can simulate key presses Fn + F11 on a laptop? Do I have to write a driver, or something like that?

The platform is Windows XP Pro SP3. Programming Language is C/C++. The purpose is create a program that allow to change enable/disable via GUI some hardware device that can turned off/on only with this hotkey. The IDE is Visual Studio 2010

Abhranil Das
  • 5,702
  • 6
  • 35
  • 42
BlackShadow
  • 1,005
  • 6
  • 19
  • 25
  • `notebook` tag removed as part of the [2012 cleanup](http://meta.stackexchange.com/questions/128315/the-great-stack-overflow-tag-question-cleanup-of-2012). – Abhranil Das Apr 29 '12 at 19:44

2 Answers2

6

Won't work. The Fn-F11 key combo on laptops isn't handled by the OS; it's processed in Systems Management Mode - a BIOS feature, essentially.

MSalters
  • 173,980
  • 10
  • 155
  • 350
0

I recently had to simulate F5 press to cause a refresh in a web browser:

INPUT inp[2]= {0};
inp[0].type = INPUT_KEYBOARD;
inp[0].ki.wVk = VK_F5;
inp[1].type = INPUT_KEYBOARD;
inp[1].ki.wVk = VK_F5;
inp[1].ki.dwFlags = KEYEVENTF_KEYUP;

SendInput(2, inp, sizeof(INPUT));

To simulate the Fn + FX Key you might have to search for special codes.

Supun Wijerathne
  • 11,964
  • 10
  • 61
  • 87
Ole Dittmann
  • 1,764
  • 1
  • 14
  • 22
  • _"To simulate the Fn + FX Key you might have to search for special codes"_ - That doesn't really answer the question, OP is specifically asking about `Fn` key in **conjunction** with other function keys such as on a laptop. –  Jul 01 '18 at 02:52