title: SendInput doesn't work with Print Screen key
body: <p>I'm making a front end for various emulators and triggering their various functionality such as save/load state, save screenshot, but with a unified interface. FS-UAE annoyingly uses "Print Screen" as its screenshot key, and I'd like to avoid the user having to change emulators from their default hotkey settings.</p>
  
  <p>I've managed to simulate any key press I want with SendInput, except for the "Print Screen" key. </p>
  
  <p>I haven't had any luck with using virtual key codes, I think that doesn't work with full screen applications.  Hence that part of the code is commented out.  (EDIT: better explanation - Virtual Key codes are ignored by DirectInput software)</p>
  
  <p>Using scan codes, I can get any key to press - almost. Print Screen seems to be the odd one out.</p>
  
  <p>Here's the reference I'm using for the scan codes;
  <a href="https://msdn.microsoft.com/en-us/library/aa299374(v=vs.60).aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/aa299374(v=vs.60).aspx</a></p>
  
  <p>Below is the minimum viable code to reproduce the problem.  If you run it, press a key then quickly switch to notepad and wait 2 seconds, it should press the letter "q" into notepad, then quit.</p>
  
  <p>Change the scan code from 0x10 (q) to 0x37 (Print Screen), be sure to do it in both places - KEY DOWN, and KEY UP.</p>
  
  <p>Now run it again, press a key and wait.  To see if Print Screen worked, open MS Paint or whatever and press CTRL+V, see if you get a screenshot of your desktop.  It doesn't work!  But if you manually press Print Screen, and CTRL+V into MS Paint, it will work.</p>
  
  <p>Why doesn't the Print Screen key work?</p>
  
  <pre><code>#include "stdafx.h"
  
  //For create process &amp; keyboard codes
  #include &lt;windows.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;tchar.h&gt;
  
  int main()
  {
      INPUT ip = {};
  
      ip.type = INPUT_KEYBOARD;
      ip.ki.wScan = 0;
      ip.ki.wVk = 0;
      ip.ki.dwExtraInfo = 0;
      ip.ki.dwFlags = 0;
  
      printf("Press a key, then taskswitch.\n");
      system("pause");
      Sleep(2000);
  
      //KEY DOWN
      ip.ki.wScan = 0x10; //0x37 PrintScreen, 0x10 Q
      ip.ki.dwFlags = KEYEVENTF_SCANCODE;
      //ip.ki.wVk = VK_SNAPSHOT;
      //ip.ki.dwFlags = 0;
      SendInput(1, &amp;ip, sizeof(INPUT));
  
      //KEY UP
      ip.ki.wScan = 0x10;
      ip.ki.dwFlags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP; 
      //ip.ki.wVk = VK_SNAPSHOT;
      //ip.ki.dwFlags = KEYEVENTF_KEYUP; 
      SendInput(1, &amp;ip, sizeof(INPUT));
  
      printf("Done.\n");
      system("pause");
      return 0;
  }
  </code></pre>