# FarPoint.Win.Spread.Keystroke.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_Keystroke__ctor_" data-uid="FarPoint.Win.Spread.Keystroke.#ctor*">Keystroke Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_Keystroke__ctor_" data-uid="FarPoint.Win.Spread.Keystroke.#ctor*"></a>
<h4 id="FarPoint_Win_Spread_Keystroke__ctor_System_Runtime_Serialization_SerializationInfo_System_Runtime_Serialization_StreamingContext_" data-uid="FarPoint.Win.Spread.Keystroke.#ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)">Keystroke(SerializationInfo, StreamingContext)</h4>
<div class="markdown level1 summary"><p>Creates a new keystroke from serialization.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Keystroke(SerializationInfo info, StreamingContext context)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(info As SerializationInfo, context As StreamingContext)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.serializationinfo">SerializationInfo</a></td>
      <td><span class="parametername">info</span></td>
      <td><p>Object that holds the serialized object data</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.runtime.serialization.streamingcontext">StreamingContext</a></td>
      <td><span class="parametername">context</span></td>
      <td><p>Contexual information about the source of the serialization</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_Keystroke__ctor_" data-uid="FarPoint.Win.Spread.Keystroke.#ctor*"></a>
<h4 id="FarPoint_Win_Spread_Keystroke__ctor_System_Char_" data-uid="FarPoint.Win.Spread.Keystroke.#ctor(System.Char)">Keystroke(char)</h4>
<div class="markdown level1 summary"><p>Creates a new keystroke with the specified character.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Keystroke(char keyChar)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(keyChar As Char)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.char">char</a></td>
      <td><span class="parametername">keyChar</span></td>
      <td><p>Character defined by this keystroke</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_Keystroke__ctor_" data-uid="FarPoint.Win.Spread.Keystroke.#ctor*"></a>
<h4 id="FarPoint_Win_Spread_Keystroke__ctor_System_Windows_Forms_Keys_System_Windows_Forms_Keys_" data-uid="FarPoint.Win.Spread.Keystroke.#ctor(System.Windows.Forms.Keys,System.Windows.Forms.Keys)">Keystroke(Keys, Keys)</h4>
<div class="markdown level1 summary"><p>Creates a new keystroke with a specified a key code and modifier keys.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Keystroke(Keys keyCode, Keys modifiers)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(keyCode As Keys, modifiers As Keys)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.keys">Keys</a></td>
      <td><span class="parametername">keyCode</span></td>
      <td><p>Key code defined by this keystroke</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.keys">Keys</a></td>
      <td><span class="parametername">modifiers</span></td>
      <td><p>Modifier keys defined by this keystroke</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_Keystroke__ctor_" data-uid="FarPoint.Win.Spread.Keystroke.#ctor*"></a>
<h4 id="FarPoint_Win_Spread_Keystroke__ctor_System_Windows_Forms_Keys_System_Windows_Forms_Keys_System_Boolean_" data-uid="FarPoint.Win.Spread.Keystroke.#ctor(System.Windows.Forms.Keys,System.Windows.Forms.Keys,System.Boolean)">Keystroke(Keys, Keys, bool)</h4>
<div class="markdown level1 summary"><p>Creates a new keystroke with a specified a key code, modifier keys,
and whether the keystroke is active on key release.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Keystroke(Keys keyCode, Keys modifiers, bool onKeyRelease)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(keyCode As Keys, modifiers As Keys, onKeyRelease As Boolean)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.keys">Keys</a></td>
      <td><span class="parametername">keyCode</span></td>
      <td><p>Key code defined by this keystroke</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.windows.forms.keys">Keys</a></td>
      <td><span class="parametername">modifiers</span></td>
      <td><p>Modifier keys defined by this keystroke</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">onKeyRelease</span></td>
      <td><p>Whether the keystroke is active on key release</p>
</td>
    </tr>
  </tbody>
</table>
</div>
