# C1.WPF.RichTextBox.C1RichTextBox.KeyDown

## Content

<div class="doc-site-dotnet-api-container">




<h1 id="C1_WPF_RichTextBox_C1RichTextBox_KeyDown" data-uid="C1.WPF.RichTextBox.C1RichTextBox.KeyDown" class="text-break">KeyDown Event
</h1>
<div class="markdown level0 summary"><p>Occurs when a keyboard key is pressed while the <a class="xref" href="C1.WPF.RichTextBox.C1RichTextBox.html">C1RichTextBox</a> has focus.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="C1.WPF.RichTextBox.html">C1.WPF.RichTextBox</a></h6>
<h6><strong>Assembly</strong>: C1.WPF.RichTextBox.dll</h6>
<h5 id="C1_WPF_RichTextBox_C1RichTextBox_KeyDown_syntax">Syntax</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public event KeyEventHandler KeyDown</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Event KeyDown As KeyEventHandler</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.input.keyeventhandler">KeyEventHandler</a></td>
      <td>Occurs when a keyboard key is pressed while the  has focus.</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_WPF_RichTextBox_C1RichTextBox_KeyDown_remarks"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><p>This event overrides <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.uielement">UIElement</a>'s KeyDown in order to allow handlers to prevent the default
behavior of a key press.</p>
</div>
</div>
