Terminal.Gui.KeyEvent.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class KeyEvent
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class KeyEvent
  11. ">
  12. <meta name="generator" content="docfx 2.59.0.0">
  13. <link rel="shortcut icon" href="../../favicon.ico">
  14. <link rel="stylesheet" href="../../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../../styles/docfx.css">
  16. <link rel="stylesheet" href="../../styles/main.css">
  17. <meta property="docfx:navrel" content="../../toc.html">
  18. <meta property="docfx:tocrel" content="toc.html">
  19. <meta property="docfx:rel" content="../../">
  20. </head>
  21. <body data-spy="scroll" data-target="#affix" data-offset="120">
  22. <div id="wrapper">
  23. <header>
  24. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  25. <div class="container">
  26. <div class="navbar-header">
  27. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  28. <span class="sr-only">Toggle navigation</span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. </button>
  33. <a class="navbar-brand" href="../../index.html">
  34. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  35. </a>
  36. </div>
  37. <div class="collapse navbar-collapse" id="navbar">
  38. <form class="navbar-form navbar-right" role="search" id="search">
  39. <div class="form-group">
  40. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. </nav>
  46. <div class="subnav navbar navbar-default">
  47. <div class="container hide-when-search" id="breadcrumb">
  48. <ul class="breadcrumb">
  49. <li></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </header>
  54. <div class="container body-content">
  55. <div id="search-results">
  56. <div class="search-list">Search Results for <span></span></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  61. </div>
  62. </div>
  63. <div role="main" class="container body-content hide-when-search">
  64. <div class="sidenav hide-when-search">
  65. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  66. <div class="sidetoggle collapse" id="sidetoggle">
  67. <div id="sidetoc"></div>
  68. </div>
  69. </div>
  70. <div class="article row grid-right">
  71. <div class="col-md-10">
  72. <article class="content wrap" id="_content" data-uid="Terminal.Gui.KeyEvent">
  73. <h1 id="Terminal_Gui_KeyEvent" data-uid="Terminal.Gui.KeyEvent" class="text-break">Class KeyEvent
  74. </h1>
  75. <div class="markdown level0 summary">
  76. Describes a keyboard event.
  77. </div>
  78. <div class="markdown level0 conceptual"></div>
  79. <div class="inheritance">
  80. <h5>Inheritance</h5>
  81. <div class="level0"><span class="xref">System.Object</span></div>
  82. <div class="level1"><span class="xref">KeyEvent</span></div>
  83. </div>
  84. <div class="inheritedMembers">
  85. <h5>Inherited Members</h5>
  86. <div>
  87. <span class="xref">System.Object.Equals(System.Object)</span>
  88. </div>
  89. <div>
  90. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  91. </div>
  92. <div>
  93. <span class="xref">System.Object.GetHashCode()</span>
  94. </div>
  95. <div>
  96. <span class="xref">System.Object.GetType()</span>
  97. </div>
  98. <div>
  99. <span class="xref">System.Object.MemberwiseClone()</span>
  100. </div>
  101. <div>
  102. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  103. </div>
  104. </div>
  105. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  106. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  107. <h5 id="Terminal_Gui_KeyEvent_syntax">Syntax</h5>
  108. <div class="codewrapper">
  109. <pre><code class="lang-csharp hljs">public class KeyEvent</code></pre>
  110. </div>
  111. <h3 id="constructors">Constructors
  112. </h3>
  113. <a id="Terminal_Gui_KeyEvent__ctor_" data-uid="Terminal.Gui.KeyEvent.#ctor*"></a>
  114. <h4 id="Terminal_Gui_KeyEvent__ctor" data-uid="Terminal.Gui.KeyEvent.#ctor">KeyEvent()</h4>
  115. <div class="markdown level1 summary">
  116. Constructs a new <a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a>
  117. </div>
  118. <div class="markdown level1 conceptual"></div>
  119. <h5 class="decalaration">Declaration</h5>
  120. <div class="codewrapper">
  121. <pre><code class="lang-csharp hljs">public KeyEvent()</code></pre>
  122. </div>
  123. <a id="Terminal_Gui_KeyEvent__ctor_" data-uid="Terminal.Gui.KeyEvent.#ctor*"></a>
  124. <h4 id="Terminal_Gui_KeyEvent__ctor_Terminal_Gui_Key_Terminal_Gui_KeyModifiers_" data-uid="Terminal.Gui.KeyEvent.#ctor(Terminal.Gui.Key,Terminal.Gui.KeyModifiers)">KeyEvent(Key, KeyModifiers)</h4>
  125. <div class="markdown level1 summary">
  126. Constructs a new <a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a> from the provided Key value - can be a rune cast into a Key value
  127. </div>
  128. <div class="markdown level1 conceptual"></div>
  129. <h5 class="decalaration">Declaration</h5>
  130. <div class="codewrapper">
  131. <pre><code class="lang-csharp hljs">public KeyEvent(Key k, KeyModifiers km)</code></pre>
  132. </div>
  133. <h5 class="parameters">Parameters</h5>
  134. <table class="table table-bordered table-striped table-condensed">
  135. <thead>
  136. <tr>
  137. <th>Type</th>
  138. <th>Name</th>
  139. <th>Description</th>
  140. </tr>
  141. </thead>
  142. <tbody>
  143. <tr>
  144. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  145. <td><span class="parametername">k</span></td>
  146. <td></td>
  147. </tr>
  148. <tr>
  149. <td><a class="xref" href="Terminal.Gui.KeyModifiers.html">KeyModifiers</a></td>
  150. <td><span class="parametername">km</span></td>
  151. <td></td>
  152. </tr>
  153. </tbody>
  154. </table>
  155. <h3 id="fields">Fields
  156. </h3>
  157. <h4 id="Terminal_Gui_KeyEvent_Key" data-uid="Terminal.Gui.KeyEvent.Key">Key</h4>
  158. <div class="markdown level1 summary">
  159. Symb olid definition for the key.
  160. </div>
  161. <div class="markdown level1 conceptual"></div>
  162. <h5 class="decalaration">Declaration</h5>
  163. <div class="codewrapper">
  164. <pre><code class="lang-csharp hljs">public Key Key</code></pre>
  165. </div>
  166. <h5 class="fieldValue">Field Value</h5>
  167. <table class="table table-bordered table-striped table-condensed">
  168. <thead>
  169. <tr>
  170. <th>Type</th>
  171. <th>Description</th>
  172. </tr>
  173. </thead>
  174. <tbody>
  175. <tr>
  176. <td><a class="xref" href="Terminal.Gui.Key.html">Key</a></td>
  177. <td></td>
  178. </tr>
  179. </tbody>
  180. </table>
  181. <h3 id="properties">Properties
  182. </h3>
  183. <a id="Terminal_Gui_KeyEvent_IsAlt_" data-uid="Terminal.Gui.KeyEvent.IsAlt*"></a>
  184. <h4 id="Terminal_Gui_KeyEvent_IsAlt" data-uid="Terminal.Gui.KeyEvent.IsAlt">IsAlt</h4>
  185. <div class="markdown level1 summary">
  186. Gets a value indicating whether the Alt key was pressed (real or synthesized)
  187. </div>
  188. <div class="markdown level1 conceptual"></div>
  189. <h5 class="decalaration">Declaration</h5>
  190. <div class="codewrapper">
  191. <pre><code class="lang-csharp hljs">public bool IsAlt { get; }</code></pre>
  192. </div>
  193. <h5 class="propertyValue">Property Value</h5>
  194. <table class="table table-bordered table-striped table-condensed">
  195. <thead>
  196. <tr>
  197. <th>Type</th>
  198. <th>Description</th>
  199. </tr>
  200. </thead>
  201. <tbody>
  202. <tr>
  203. <td><span class="xref">System.Boolean</span></td>
  204. <td><code>true</code> if is alternate; otherwise, <code>false</code>.</td>
  205. </tr>
  206. </tbody>
  207. </table>
  208. <a id="Terminal_Gui_KeyEvent_IsCapslock_" data-uid="Terminal.Gui.KeyEvent.IsCapslock*"></a>
  209. <h4 id="Terminal_Gui_KeyEvent_IsCapslock" data-uid="Terminal.Gui.KeyEvent.IsCapslock">IsCapslock</h4>
  210. <div class="markdown level1 summary">
  211. Gets a value indicating whether the Caps lock key was pressed (real or synthesized)
  212. </div>
  213. <div class="markdown level1 conceptual"></div>
  214. <h5 class="decalaration">Declaration</h5>
  215. <div class="codewrapper">
  216. <pre><code class="lang-csharp hljs">public bool IsCapslock { get; }</code></pre>
  217. </div>
  218. <h5 class="propertyValue">Property Value</h5>
  219. <table class="table table-bordered table-striped table-condensed">
  220. <thead>
  221. <tr>
  222. <th>Type</th>
  223. <th>Description</th>
  224. </tr>
  225. </thead>
  226. <tbody>
  227. <tr>
  228. <td><span class="xref">System.Boolean</span></td>
  229. <td><code>true</code> if is alternate; otherwise, <code>false</code>.</td>
  230. </tr>
  231. </tbody>
  232. </table>
  233. <a id="Terminal_Gui_KeyEvent_IsCtrl_" data-uid="Terminal.Gui.KeyEvent.IsCtrl*"></a>
  234. <h4 id="Terminal_Gui_KeyEvent_IsCtrl" data-uid="Terminal.Gui.KeyEvent.IsCtrl">IsCtrl</h4>
  235. <div class="markdown level1 summary">
  236. Determines whether the value is a control key (and NOT just the ctrl key)
  237. </div>
  238. <div class="markdown level1 conceptual"></div>
  239. <h5 class="decalaration">Declaration</h5>
  240. <div class="codewrapper">
  241. <pre><code class="lang-csharp hljs">public bool IsCtrl { get; }</code></pre>
  242. </div>
  243. <h5 class="propertyValue">Property Value</h5>
  244. <table class="table table-bordered table-striped table-condensed">
  245. <thead>
  246. <tr>
  247. <th>Type</th>
  248. <th>Description</th>
  249. </tr>
  250. </thead>
  251. <tbody>
  252. <tr>
  253. <td><span class="xref">System.Boolean</span></td>
  254. <td><code>true</code> if is ctrl; otherwise, <code>false</code>.</td>
  255. </tr>
  256. </tbody>
  257. </table>
  258. <a id="Terminal_Gui_KeyEvent_IsNumlock_" data-uid="Terminal.Gui.KeyEvent.IsNumlock*"></a>
  259. <h4 id="Terminal_Gui_KeyEvent_IsNumlock" data-uid="Terminal.Gui.KeyEvent.IsNumlock">IsNumlock</h4>
  260. <div class="markdown level1 summary">
  261. Gets a value indicating whether the Num lock key was pressed (real or synthesized)
  262. </div>
  263. <div class="markdown level1 conceptual"></div>
  264. <h5 class="decalaration">Declaration</h5>
  265. <div class="codewrapper">
  266. <pre><code class="lang-csharp hljs">public bool IsNumlock { get; }</code></pre>
  267. </div>
  268. <h5 class="propertyValue">Property Value</h5>
  269. <table class="table table-bordered table-striped table-condensed">
  270. <thead>
  271. <tr>
  272. <th>Type</th>
  273. <th>Description</th>
  274. </tr>
  275. </thead>
  276. <tbody>
  277. <tr>
  278. <td><span class="xref">System.Boolean</span></td>
  279. <td><code>true</code> if is alternate; otherwise, <code>false</code>.</td>
  280. </tr>
  281. </tbody>
  282. </table>
  283. <a id="Terminal_Gui_KeyEvent_IsScrolllock_" data-uid="Terminal.Gui.KeyEvent.IsScrolllock*"></a>
  284. <h4 id="Terminal_Gui_KeyEvent_IsScrolllock" data-uid="Terminal.Gui.KeyEvent.IsScrolllock">IsScrolllock</h4>
  285. <div class="markdown level1 summary">
  286. Gets a value indicating whether the Scroll lock key was pressed (real or synthesized)
  287. </div>
  288. <div class="markdown level1 conceptual"></div>
  289. <h5 class="decalaration">Declaration</h5>
  290. <div class="codewrapper">
  291. <pre><code class="lang-csharp hljs">public bool IsScrolllock { get; }</code></pre>
  292. </div>
  293. <h5 class="propertyValue">Property Value</h5>
  294. <table class="table table-bordered table-striped table-condensed">
  295. <thead>
  296. <tr>
  297. <th>Type</th>
  298. <th>Description</th>
  299. </tr>
  300. </thead>
  301. <tbody>
  302. <tr>
  303. <td><span class="xref">System.Boolean</span></td>
  304. <td><code>true</code> if is alternate; otherwise, <code>false</code>.</td>
  305. </tr>
  306. </tbody>
  307. </table>
  308. <a id="Terminal_Gui_KeyEvent_IsShift_" data-uid="Terminal.Gui.KeyEvent.IsShift*"></a>
  309. <h4 id="Terminal_Gui_KeyEvent_IsShift" data-uid="Terminal.Gui.KeyEvent.IsShift">IsShift</h4>
  310. <div class="markdown level1 summary">
  311. Gets a value indicating whether the Shift key was pressed.
  312. </div>
  313. <div class="markdown level1 conceptual"></div>
  314. <h5 class="decalaration">Declaration</h5>
  315. <div class="codewrapper">
  316. <pre><code class="lang-csharp hljs">public bool IsShift { get; }</code></pre>
  317. </div>
  318. <h5 class="propertyValue">Property Value</h5>
  319. <table class="table table-bordered table-striped table-condensed">
  320. <thead>
  321. <tr>
  322. <th>Type</th>
  323. <th>Description</th>
  324. </tr>
  325. </thead>
  326. <tbody>
  327. <tr>
  328. <td><span class="xref">System.Boolean</span></td>
  329. <td><code>true</code> if is shift; otherwise, <code>false</code>.</td>
  330. </tr>
  331. </tbody>
  332. </table>
  333. <a id="Terminal_Gui_KeyEvent_KeyValue_" data-uid="Terminal.Gui.KeyEvent.KeyValue*"></a>
  334. <h4 id="Terminal_Gui_KeyEvent_KeyValue" data-uid="Terminal.Gui.KeyEvent.KeyValue">KeyValue</h4>
  335. <div class="markdown level1 summary">
  336. The key value cast to an integer, you will typical use this for
  337. extracting the Unicode rune value out of a key, when none of the
  338. symbolic options are in use.
  339. </div>
  340. <div class="markdown level1 conceptual"></div>
  341. <h5 class="decalaration">Declaration</h5>
  342. <div class="codewrapper">
  343. <pre><code class="lang-csharp hljs">public int KeyValue { get; }</code></pre>
  344. </div>
  345. <h5 class="propertyValue">Property Value</h5>
  346. <table class="table table-bordered table-striped table-condensed">
  347. <thead>
  348. <tr>
  349. <th>Type</th>
  350. <th>Description</th>
  351. </tr>
  352. </thead>
  353. <tbody>
  354. <tr>
  355. <td><span class="xref">System.Int32</span></td>
  356. <td></td>
  357. </tr>
  358. </tbody>
  359. </table>
  360. <h3 id="methods">Methods
  361. </h3>
  362. <a id="Terminal_Gui_KeyEvent_ToString_" data-uid="Terminal.Gui.KeyEvent.ToString*"></a>
  363. <h4 id="Terminal_Gui_KeyEvent_ToString" data-uid="Terminal.Gui.KeyEvent.ToString">ToString()</h4>
  364. <div class="markdown level1 summary">
  365. Pretty prints the KeyEvent
  366. </div>
  367. <div class="markdown level1 conceptual"></div>
  368. <h5 class="decalaration">Declaration</h5>
  369. <div class="codewrapper">
  370. <pre><code class="lang-csharp hljs">public override string ToString()</code></pre>
  371. </div>
  372. <h5 class="returns">Returns</h5>
  373. <table class="table table-bordered table-striped table-condensed">
  374. <thead>
  375. <tr>
  376. <th>Type</th>
  377. <th>Description</th>
  378. </tr>
  379. </thead>
  380. <tbody>
  381. <tr>
  382. <td><span class="xref">System.String</span></td>
  383. <td></td>
  384. </tr>
  385. </tbody>
  386. </table>
  387. <h5 class="overrides">Overrides</h5>
  388. <div><span class="xref">System.Object.ToString()</span></div>
  389. </article>
  390. </div>
  391. <div class="hidden-sm col-md-2" role="complementary">
  392. <div class="sideaffix">
  393. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  394. <h5>In This Article</h5>
  395. <div></div>
  396. </nav>
  397. </div>
  398. </div>
  399. </div>
  400. </div>
  401. <footer>
  402. <div class="grad-bottom"></div>
  403. <div class="footer">
  404. <div class="container">
  405. <span class="pull-right">
  406. <a href="#top">Back to top</a>
  407. </span>
  408. <span>Generated by <strong>DocFX</strong></span>
  409. </div>
  410. </div>
  411. </footer>
  412. </div>
  413. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  414. <script type="text/javascript" src="../../styles/docfx.js"></script>
  415. <script type="text/javascript" src="../../styles/main.js"></script>
  416. </body>
  417. </html>