title: Best way to implement keyboard shortcuts in a Windows Forms application?
body: <p>I'm looking for a best way to implement common Windows keyboard shortcuts (for example <kbd>Ctrl</kbd>+<kbd>F</kbd>, <kbd>Ctrl</kbd>+<kbd>N</kbd>) in my <a href="http://en.wikipedia.org/wiki/Windows_Forms" rel="noreferrer">Windows Forms</a> application in C#.</p>
  
  <p>The application has a main form which hosts many child forms (one at a time). When a user hits <kbd>Ctrl</kbd>+<kbd>F</kbd>, I'd like to show a custom search form. The search form would depend on the current open child form in the application.</p>
  
  <p>I was thinking of using something like this in the <em>ChildForm_KeyDown</em> event:</p>
  
  <pre><code>   if (e.KeyCode == Keys.F &amp;&amp; Control.ModifierKeys == Keys.Control)
          // Show search form
  </code></pre>
  
  <p>But this doesn't work. The event doesn't even fire when you press a key. What is the solution?</p>