Terminal.Gui.KeyEvent.html 15 KB

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