# FarPoint.Win.Spread.KeystrokeFactory.CreateKeystroke

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_KeystrokeFactory_CreateKeystroke_" data-uid="FarPoint.Win.Spread.KeystrokeFactory.CreateKeystroke*">CreateKeystroke Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_KeystrokeFactory_CreateKeystroke_" data-uid="FarPoint.Win.Spread.KeystrokeFactory.CreateKeystroke*"></a>
<h4 id="FarPoint_Win_Spread_KeystrokeFactory_CreateKeystroke_System_Char_" data-uid="FarPoint.Win.Spread.KeystrokeFactory.CreateKeystroke(System.Char)">CreateKeystroke(char)</h4>
<div class="markdown level1 summary"><p>Creates a <a class="xref" href="FarPoint.Win.Spread.Keystroke.html">Keystroke</a> object from a 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 CreateKeystroke(char keyChar)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateKeystroke(keyChar As Char) As Keystroke</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 for the keystroke</p>
</td>
    </tr>
  </tbody>
</table>
<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="FarPoint.Win.Spread.Keystroke.html">Keystroke</a></td>
      <td><p>A new Keystroke object.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_KeystrokeFactory_CreateKeystroke_" data-uid="FarPoint.Win.Spread.KeystrokeFactory.CreateKeystroke*"></a>
<h4 id="FarPoint_Win_Spread_KeystrokeFactory_CreateKeystroke_System_Windows_Forms_Keys_System_Windows_Forms_Keys_" data-uid="FarPoint.Win.Spread.KeystrokeFactory.CreateKeystroke(System.Windows.Forms.Keys,System.Windows.Forms.Keys)">CreateKeystroke(Keys, Keys)</h4>
<div class="markdown level1 summary"><p>Creates a <a class="xref" href="FarPoint.Win.Spread.Keystroke.html">Keystroke</a> object from a key code and modifiers.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Keystroke CreateKeystroke(Keys keyCode, Keys modifiers)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateKeystroke(keyCode As Keys, modifiers As Keys) As Keystroke</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 for the 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 for the keystroke</p>
</td>
    </tr>
  </tbody>
</table>
<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="FarPoint.Win.Spread.Keystroke.html">Keystroke</a></td>
      <td><p>A new Keystroke object.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_KeystrokeFactory_CreateKeystroke_" data-uid="FarPoint.Win.Spread.KeystrokeFactory.CreateKeystroke*"></a>
<h4 id="FarPoint_Win_Spread_KeystrokeFactory_CreateKeystroke_System_Windows_Forms_Keys_System_Windows_Forms_Keys_System_Boolean_" data-uid="FarPoint.Win.Spread.KeystrokeFactory.CreateKeystroke(System.Windows.Forms.Keys,System.Windows.Forms.Keys,System.Boolean)">CreateKeystroke(Keys, Keys, bool)</h4>
<div class="markdown level1 summary"><p>Creates a <a class="xref" href="FarPoint.Win.Spread.Keystroke.html">Keystroke</a> object from a key code and modifiers.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public Keystroke CreateKeystroke(Keys keyCode, Keys modifiers, bool onKeyRelease)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateKeystroke(keyCode As Keys, modifiers As Keys, onKeyRelease As Boolean) As Keystroke</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 for the 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 for the 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>
<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="FarPoint.Win.Spread.Keystroke.html">Keystroke</a></td>
      <td><p>A new Keystroke object.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
