开发者

Simulate Fn+F11 key press

Can you tell me how I can simulate key presses Fn + F11 on a laptop? Do I h开发者_JAVA技巧ave 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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜