title: How can I use ToUnicode without breaking dead key support?
body: <p>A similar question has already been asked, so I'm not going to waste time re-explaining it, an existing discussion can be found here:
  <a href="https://stackoverflow.com/questions/1964614/toascii-tounicode-in-a-keyboard-hook-destroys-dead-keys">ToAscii/ToUnicode in a keyboard hook destroys dead keys</a></p>
  
  <p>The reason I'm posting a new question however is that I seem to have come across a 'solution', but I'm not quite sure how to implement it.</p>
  
  <p>This blog post seems to propose a solution to the problem of ToUnicode killing dead-key support:
  <a href="http://www.siao2.com/2005/01/19/355870.aspx" rel="nofollow noreferrer">http://www.siao2.com/2005/01/19/355870.aspx</a></p>
  
  <p>However I'm not sure how to implement the suggested solution. A push in the right direction would be greatly appreciated.</p>
  
  <p>To be clear, the part I'm referring to is this:</p>
  
  <blockquote>
    <p>There are two ways to work around this:</p>
    
    <p>1) You can keep calling ToUnicode with the same info until it is cleared out and then call it one more time to put the state back where it was if you had never typed anything, or</p>
    
    <p>2) You can load all of the keyboard info ahead of time and then when they type information you can look up in your own info cache what the keystrokes mean, without having to call APIs later.</p>
  </blockquote>
  
  <p>I'm not quite sure how to do either of those things (keyboards and internationalization are far from my strong point), so any help would be greatly appreciated.</p>
  
  <p>Thanks</p>