Simulate Fn+F11 key press

后端 未结 2 1312
说谎
说谎 2021-01-07 11:09

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 Windo

相关标签:
2条回答
  • 2021-01-07 11:33

    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.

    0 讨论(0)
  • 2021-01-07 11:39

    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 讨论(0)
提交回复
热议问题