title: Could not send backspace key using ::SendInput() to wordpad application
body: <p>I have used sendinput() function and windows keyboard hooks to develop a custom keyboard for indian languages.
  Project is in google code here: <a href="http://code.google.com/p/ekalappai" rel="nofollow noreferrer">http://code.google.com/p/ekalappai</a></p>
  
  <p>The keyboad hook and sendinput functions are placed in a win32 dll. And they are called from a Qt exe. 
  Our application works fine for most keys and applications. I find the following issue:</p>
  
  <p>I could not send Backspace key to few applications like Wordpad/Openoffice/MsOffice. I find same issue with Arrowkeys and delete keys.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>extern "C" __declspec(dllexport) void GenerateKey(int vk , bool bExtended)
  {
      //update previous characters
      previous_2_character = previous_1_character;
      previous_1_character = vk;
  
      KEYBDINPUT kb={0};
      INPUT Input={0};
  
      //keydown
      kb.wVk    =  0;
      kb.wScan = vk;/*enter unicode here*/;
      kb.dwFlags = KEYEVENTF_UNICODE; // KEYEVENTF_UNICODE=4
      Input.type = INPUT_KEYBOARD;
      Input.ki = kb;
  
      ::SendInput(1,&amp;Input,sizeof(Input));
  
      //keyup
      kb.wVk    =  0;
      kb.wScan = vk;/*enter unicode here*/;
      kb.dwFlags = KEYEVENTF_UNICODE|KEYEVENTF_KEYUP; //KEYEVENTF_UNICODE=4
      Input.type = INPUT_KEYBOARD;
      Input.ki = kb;
  
      ::SendInput(1,&amp;Input,sizeof(Input));
  }
  </code></pre>
  
  <p>Full dll code is here: <a href="http://code.google.com/p/ekalappai/source/browse/trunk/ekhook/ekhook/dllmain.cpp" rel="nofollow noreferrer">http://code.google.com/p/ekalappai/source/browse/trunk/ekhook/ekhook/dllmain.cpp</a></p>
  
  <p>Calling code:</p>
  
  <pre><code>generatekey = (GenerateKey) myLib-&gt;resolve( "GenerateKey" );
  
  generatekey(44,FALSE); //comma - THis works in wordpad/MsOffice/Openoffice
  generatekey(2949,FALSE); //tamil character "a" works in Wordpad/Msoffice/Openoffice
  
  generatekey(8,FALSE); //backspace - This is NOT working in Wordpad/Msoffice/Openoffice
  </code></pre>
  
  <p>Full calling code from Qt Exe is here:
  <a href="http://code.google.com/p/ekalappai/source/browse/trunk/ekalappai/window.cpp" rel="nofollow noreferrer">http://code.google.com/p/ekalappai/source/browse/trunk/ekalappai/window.cpp</a></p>
  
  <p>I tried searching in google but could not fine a solution yet. If anyone has clue on resolving this pls help. Thanks.</p>