title: Simulating number-sign (#) keystroke in C#
body: <p>I'm trying to accurately type a hash sign (number sign, pound sign, octothorpe, whatever you call it) using <code>SendInput</code> in user32.dll.</p>
  
  <p>These are the possible options I see:</p>
  
  <ol>
  <li><p>Type the number-sign by simulating <strong>SHIFT+3</strong> (SHFT_DN, 3_DN, 3_UP, SHFT_UP). My only concern would be US-layout keyboards. Is there a possibility of a system that is configured with non-US layouts to output an incorrect key?</p></li>
  <li><p>My other option would be to insert the character by the ascii code by simulating key press: <strong>ALT+035</strong> (ALT_DN, NUMPAD0_DN, NUMPAD0_UP, NUMPAD3_DN, NUMPAD3_UP, NUMPAD5_DN, NUMPAD5_UP, ALT_UP). Are there any major downfalls to this method? Do all regions share the same ASCII codes and does Windows provide this ALT+### functionality in all regions? This is also going to generate a lot of keystrokes for a single simple character.  I don't know if that's a potential problem.</p></li>
  <li><p>Ideally there would be a Virtual Key Code that was a hash symbol, but I don't see one.  Am I missing it?</p></li>
  </ol>
  
  <p>Any other possibilities that I'm not thinking of?  I really need to continue using <code>SendInput</code> for a few reasons.</p>
  
  <p>So my question is, how do I use <code>SendInput</code> to simulate a number/hash sign being typed, and make that be global and not-dependent on non-US keyboards with the least number of keystrokes possible?</p>
  
  <p>Thank you</p>