title: KeyBinding gesture "Ctrl+1" in RichTextBox doesn't work
body: <p>There is a strange difference when binding commands to <kbd>Ctrl+N</kbd> gestures in WPF. Some but not all of these gestures are ignored, while the rest are ok. Did  anyone else experience this behavior by any chance?</p>
  
  <p>Window XAML structure is very simple: command binding, input binding, and a DockPanel with Menu and RichTextBox. After testing, the problem appears only when input focus is in RichTextBox.</p>
  
  <p>For the test, Window input binding was defined for all numeric keys as shown below.
  As a result, <kbd>Ctrl+1</kbd>, <kbd>Ctrl+2</kbd>, and <kbd>Ctrl+5</kbd> wouldn't do anything, while <kbd>Ctrl+3</kbd>, <kbd>4</kbd>, <kbd>6-9</kbd>, and <kbd>0</kbd> are working just fine. <kbd>Alt+1</kbd>, <kbd>Alt+2</kbd> are working ok as well.</p>
  
  <pre><code> &lt;Window.InputBindings&gt;
    &lt;KeyBinding Command="me:MainWindow.MyRC" Gesture="CTRL+0" /&gt;
    &lt;KeyBinding Command="me:MainWindow.MyRC" Gesture="CTRL+1" /&gt;
    ...
    &lt;KeyBinding Command="me:MainWindow.MyRC" Gesture="CTRL+9" /&gt;
   &lt;/Window.InputBindings&gt;
  </code></pre>
  
  <h2>Problem cause</h2>
  
  <p>As Andy pointed out, RichTextBox already binds some gestures to internal commands. When this gesture is handled inside RTB it won't be passed to the Window level. This is somewhat hard to detect when there is no apparent effect of key stroke on the text in RTB.</p>
  
  <h2>Solution 1</h2>
  
  <p>If command only makes sense in the context of RTB - move input binding inside it to override default command binding:</p>
  
  <pre><code>&lt;RichTextBox.InputBindings&gt;
      &lt;KeyBinding Command="me:WindowBindingTest.MyRC1" Gesture="CTRL+1" /&gt;
      &lt;KeyBinding Command="me:WindowBindingTest.MyRC2" Gesture="CTRL+2" /&gt;
      &lt;KeyBinding Command="me:WindowBindingTest.MyRC5" Gesture="CTRL+5" /&gt;
  &lt;/RichTextBox.InputBindings&gt;
  </code></pre>
  
  <h2>Solution 2</h2>
  
  <p>If commmand has "larger scope" and should be available even when input focus is outside of RTB - remove gesture binding from unused default RTB commands:</p>
  
  <pre><code>&lt;RichTextBox.InputBindings&gt;
      &lt;KeyBinding Command="NotACommand" Gesture="CTRL+1" /&gt;
      &lt;KeyBinding Command="NotACommand" Gesture="CTRL+2" /&gt;
      &lt;KeyBinding Command="NotACommand" Gesture="CTRL+5" /&gt;
  &lt;/RichTextBox.InputBindings&gt;
  </code></pre>