Terminal.Gui.Responder.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  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 Responder
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class Responder
  11. ">
  12. <meta name="generator" content="docfx 2.54.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"></div>
  57. <div class="sr-items">
  58. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  59. </div>
  60. <ul id="pagination"></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.Responder">
  73. <h1 id="Terminal_Gui_Responder" data-uid="Terminal.Gui.Responder" class="text-break">Class Responder
  74. </h1>
  75. <div class="markdown level0 summary">
  76. Responder base class implemented by objects that want to participate on keyboard and mouse input.
  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">Responder</span></div>
  83. <div class="level2"><a class="xref" href="Terminal.Gui.View.html">View</a></div>
  84. </div>
  85. <div class="inheritedMembers">
  86. <h5>Inherited Members</h5>
  87. <div>
  88. <span class="xref">System.Object.Equals(System.Object)</span>
  89. </div>
  90. <div>
  91. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  92. </div>
  93. <div>
  94. <span class="xref">System.Object.GetHashCode()</span>
  95. </div>
  96. <div>
  97. <span class="xref">System.Object.GetType()</span>
  98. </div>
  99. <div>
  100. <span class="xref">System.Object.MemberwiseClone()</span>
  101. </div>
  102. <div>
  103. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  104. </div>
  105. <div>
  106. <span class="xref">System.Object.ToString()</span>
  107. </div>
  108. </div>
  109. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  110. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  111. <h5 id="Terminal_Gui_Responder_syntax">Syntax</h5>
  112. <div class="codewrapper">
  113. <pre><code class="lang-csharp hljs">public class Responder</code></pre>
  114. </div>
  115. <h3 id="properties">Properties
  116. </h3>
  117. <a id="Terminal_Gui_Responder_CanFocus_" data-uid="Terminal.Gui.Responder.CanFocus*"></a>
  118. <h4 id="Terminal_Gui_Responder_CanFocus" data-uid="Terminal.Gui.Responder.CanFocus">CanFocus</h4>
  119. <div class="markdown level1 summary">
  120. Gets or sets a value indicating whether this <a class="xref" href="Terminal.Gui.Responder.html">Responder</a> can focus.
  121. </div>
  122. <div class="markdown level1 conceptual"></div>
  123. <h5 class="decalaration">Declaration</h5>
  124. <div class="codewrapper">
  125. <pre><code class="lang-csharp hljs">public virtual bool CanFocus { get; set; }</code></pre>
  126. </div>
  127. <h5 class="propertyValue">Property Value</h5>
  128. <table class="table table-bordered table-striped table-condensed">
  129. <thead>
  130. <tr>
  131. <th>Type</th>
  132. <th>Description</th>
  133. </tr>
  134. </thead>
  135. <tbody>
  136. <tr>
  137. <td><span class="xref">System.Boolean</span></td>
  138. <td><code>true</code> if can focus; otherwise, <code>false</code>.</td>
  139. </tr>
  140. </tbody>
  141. </table>
  142. <a id="Terminal_Gui_Responder_HasFocus_" data-uid="Terminal.Gui.Responder.HasFocus*"></a>
  143. <h4 id="Terminal_Gui_Responder_HasFocus" data-uid="Terminal.Gui.Responder.HasFocus">HasFocus</h4>
  144. <div class="markdown level1 summary">
  145. Gets or sets a value indicating whether this <a class="xref" href="Terminal.Gui.Responder.html">Responder</a> has focus.
  146. </div>
  147. <div class="markdown level1 conceptual"></div>
  148. <h5 class="decalaration">Declaration</h5>
  149. <div class="codewrapper">
  150. <pre><code class="lang-csharp hljs">public virtual bool HasFocus { get; }</code></pre>
  151. </div>
  152. <h5 class="propertyValue">Property Value</h5>
  153. <table class="table table-bordered table-striped table-condensed">
  154. <thead>
  155. <tr>
  156. <th>Type</th>
  157. <th>Description</th>
  158. </tr>
  159. </thead>
  160. <tbody>
  161. <tr>
  162. <td><span class="xref">System.Boolean</span></td>
  163. <td><code>true</code> if has focus; otherwise, <code>false</code>.</td>
  164. </tr>
  165. </tbody>
  166. </table>
  167. <h3 id="methods">Methods
  168. </h3>
  169. <a id="Terminal_Gui_Responder_MouseEvent_" data-uid="Terminal.Gui.Responder.MouseEvent*"></a>
  170. <h4 id="Terminal_Gui_Responder_MouseEvent_Terminal_Gui_MouseEvent_" data-uid="Terminal.Gui.Responder.MouseEvent(Terminal.Gui.MouseEvent)">MouseEvent(MouseEvent)</h4>
  171. <div class="markdown level1 summary">
  172. Method invoked when a mouse event is generated
  173. </div>
  174. <div class="markdown level1 conceptual"></div>
  175. <h5 class="decalaration">Declaration</h5>
  176. <div class="codewrapper">
  177. <pre><code class="lang-csharp hljs">public virtual bool MouseEvent(MouseEvent mouseEvent)</code></pre>
  178. </div>
  179. <h5 class="parameters">Parameters</h5>
  180. <table class="table table-bordered table-striped table-condensed">
  181. <thead>
  182. <tr>
  183. <th>Type</th>
  184. <th>Name</th>
  185. <th>Description</th>
  186. </tr>
  187. </thead>
  188. <tbody>
  189. <tr>
  190. <td><a class="xref" href="Terminal.Gui.MouseEvent.html">MouseEvent</a></td>
  191. <td><span class="parametername">mouseEvent</span></td>
  192. <td>Contains the details about the mouse event.</td>
  193. </tr>
  194. </tbody>
  195. </table>
  196. <h5 class="returns">Returns</h5>
  197. <table class="table table-bordered table-striped table-condensed">
  198. <thead>
  199. <tr>
  200. <th>Type</th>
  201. <th>Description</th>
  202. </tr>
  203. </thead>
  204. <tbody>
  205. <tr>
  206. <td><span class="xref">System.Boolean</span></td>
  207. <td><code>true</code>, if the event was handled, <code>false</code> otherwise.</td>
  208. </tr>
  209. </tbody>
  210. </table>
  211. <a id="Terminal_Gui_Responder_OnEnter_" data-uid="Terminal.Gui.Responder.OnEnter*"></a>
  212. <h4 id="Terminal_Gui_Responder_OnEnter" data-uid="Terminal.Gui.Responder.OnEnter">OnEnter()</h4>
  213. <div class="markdown level1 summary">
  214. Method invoked when a view gets focus.
  215. </div>
  216. <div class="markdown level1 conceptual"></div>
  217. <h5 class="decalaration">Declaration</h5>
  218. <div class="codewrapper">
  219. <pre><code class="lang-csharp hljs">public virtual bool OnEnter()</code></pre>
  220. </div>
  221. <h5 class="returns">Returns</h5>
  222. <table class="table table-bordered table-striped table-condensed">
  223. <thead>
  224. <tr>
  225. <th>Type</th>
  226. <th>Description</th>
  227. </tr>
  228. </thead>
  229. <tbody>
  230. <tr>
  231. <td><span class="xref">System.Boolean</span></td>
  232. <td><code>true</code>, if the event was handled, <code>false</code> otherwise.</td>
  233. </tr>
  234. </tbody>
  235. </table>
  236. <a id="Terminal_Gui_Responder_OnKeyDown_" data-uid="Terminal.Gui.Responder.OnKeyDown*"></a>
  237. <h4 id="Terminal_Gui_Responder_OnKeyDown_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Responder.OnKeyDown(Terminal.Gui.KeyEvent)">OnKeyDown(KeyEvent)</h4>
  238. <div class="markdown level1 summary">
  239. Method invoked when a key is pressed.
  240. </div>
  241. <div class="markdown level1 conceptual"></div>
  242. <h5 class="decalaration">Declaration</h5>
  243. <div class="codewrapper">
  244. <pre><code class="lang-csharp hljs">public virtual bool OnKeyDown(KeyEvent keyEvent)</code></pre>
  245. </div>
  246. <h5 class="parameters">Parameters</h5>
  247. <table class="table table-bordered table-striped table-condensed">
  248. <thead>
  249. <tr>
  250. <th>Type</th>
  251. <th>Name</th>
  252. <th>Description</th>
  253. </tr>
  254. </thead>
  255. <tbody>
  256. <tr>
  257. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  258. <td><span class="parametername">keyEvent</span></td>
  259. <td>Contains the details about the key that produced the event.</td>
  260. </tr>
  261. </tbody>
  262. </table>
  263. <h5 class="returns">Returns</h5>
  264. <table class="table table-bordered table-striped table-condensed">
  265. <thead>
  266. <tr>
  267. <th>Type</th>
  268. <th>Description</th>
  269. </tr>
  270. </thead>
  271. <tbody>
  272. <tr>
  273. <td><span class="xref">System.Boolean</span></td>
  274. <td>true if the event was handled</td>
  275. </tr>
  276. </tbody>
  277. </table>
  278. <a id="Terminal_Gui_Responder_OnKeyUp_" data-uid="Terminal.Gui.Responder.OnKeyUp*"></a>
  279. <h4 id="Terminal_Gui_Responder_OnKeyUp_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Responder.OnKeyUp(Terminal.Gui.KeyEvent)">OnKeyUp(KeyEvent)</h4>
  280. <div class="markdown level1 summary">
  281. Method invoked when a key is released.
  282. </div>
  283. <div class="markdown level1 conceptual"></div>
  284. <h5 class="decalaration">Declaration</h5>
  285. <div class="codewrapper">
  286. <pre><code class="lang-csharp hljs">public virtual bool OnKeyUp(KeyEvent keyEvent)</code></pre>
  287. </div>
  288. <h5 class="parameters">Parameters</h5>
  289. <table class="table table-bordered table-striped table-condensed">
  290. <thead>
  291. <tr>
  292. <th>Type</th>
  293. <th>Name</th>
  294. <th>Description</th>
  295. </tr>
  296. </thead>
  297. <tbody>
  298. <tr>
  299. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  300. <td><span class="parametername">keyEvent</span></td>
  301. <td>Contains the details about the key that produced the event.</td>
  302. </tr>
  303. </tbody>
  304. </table>
  305. <h5 class="returns">Returns</h5>
  306. <table class="table table-bordered table-striped table-condensed">
  307. <thead>
  308. <tr>
  309. <th>Type</th>
  310. <th>Description</th>
  311. </tr>
  312. </thead>
  313. <tbody>
  314. <tr>
  315. <td><span class="xref">System.Boolean</span></td>
  316. <td>true if the event was handled</td>
  317. </tr>
  318. </tbody>
  319. </table>
  320. <a id="Terminal_Gui_Responder_OnLeave_" data-uid="Terminal.Gui.Responder.OnLeave*"></a>
  321. <h4 id="Terminal_Gui_Responder_OnLeave" data-uid="Terminal.Gui.Responder.OnLeave">OnLeave()</h4>
  322. <div class="markdown level1 summary">
  323. Method invoked when a view loses focus.
  324. </div>
  325. <div class="markdown level1 conceptual"></div>
  326. <h5 class="decalaration">Declaration</h5>
  327. <div class="codewrapper">
  328. <pre><code class="lang-csharp hljs">public virtual bool OnLeave()</code></pre>
  329. </div>
  330. <h5 class="returns">Returns</h5>
  331. <table class="table table-bordered table-striped table-condensed">
  332. <thead>
  333. <tr>
  334. <th>Type</th>
  335. <th>Description</th>
  336. </tr>
  337. </thead>
  338. <tbody>
  339. <tr>
  340. <td><span class="xref">System.Boolean</span></td>
  341. <td><code>true</code>, if the event was handled, <code>false</code> otherwise.</td>
  342. </tr>
  343. </tbody>
  344. </table>
  345. <a id="Terminal_Gui_Responder_OnMouseEnter_" data-uid="Terminal.Gui.Responder.OnMouseEnter*"></a>
  346. <h4 id="Terminal_Gui_Responder_OnMouseEnter_Terminal_Gui_MouseEvent_" data-uid="Terminal.Gui.Responder.OnMouseEnter(Terminal.Gui.MouseEvent)">OnMouseEnter(MouseEvent)</h4>
  347. <div class="markdown level1 summary">
  348. Method invoked when a mouse event is generated for the first time.
  349. </div>
  350. <div class="markdown level1 conceptual"></div>
  351. <h5 class="decalaration">Declaration</h5>
  352. <div class="codewrapper">
  353. <pre><code class="lang-csharp hljs">public virtual bool OnMouseEnter(MouseEvent mouseEvent)</code></pre>
  354. </div>
  355. <h5 class="parameters">Parameters</h5>
  356. <table class="table table-bordered table-striped table-condensed">
  357. <thead>
  358. <tr>
  359. <th>Type</th>
  360. <th>Name</th>
  361. <th>Description</th>
  362. </tr>
  363. </thead>
  364. <tbody>
  365. <tr>
  366. <td><a class="xref" href="Terminal.Gui.MouseEvent.html">MouseEvent</a></td>
  367. <td><span class="parametername">mouseEvent</span></td>
  368. <td></td>
  369. </tr>
  370. </tbody>
  371. </table>
  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.Boolean</span></td>
  383. <td><code>true</code>, if the event was handled, <code>false</code> otherwise.</td>
  384. </tr>
  385. </tbody>
  386. </table>
  387. <a id="Terminal_Gui_Responder_OnMouseLeave_" data-uid="Terminal.Gui.Responder.OnMouseLeave*"></a>
  388. <h4 id="Terminal_Gui_Responder_OnMouseLeave_Terminal_Gui_MouseEvent_" data-uid="Terminal.Gui.Responder.OnMouseLeave(Terminal.Gui.MouseEvent)">OnMouseLeave(MouseEvent)</h4>
  389. <div class="markdown level1 summary">
  390. Method invoked when a mouse event is generated for the last time.
  391. </div>
  392. <div class="markdown level1 conceptual"></div>
  393. <h5 class="decalaration">Declaration</h5>
  394. <div class="codewrapper">
  395. <pre><code class="lang-csharp hljs">public virtual bool OnMouseLeave(MouseEvent mouseEvent)</code></pre>
  396. </div>
  397. <h5 class="parameters">Parameters</h5>
  398. <table class="table table-bordered table-striped table-condensed">
  399. <thead>
  400. <tr>
  401. <th>Type</th>
  402. <th>Name</th>
  403. <th>Description</th>
  404. </tr>
  405. </thead>
  406. <tbody>
  407. <tr>
  408. <td><a class="xref" href="Terminal.Gui.MouseEvent.html">MouseEvent</a></td>
  409. <td><span class="parametername">mouseEvent</span></td>
  410. <td></td>
  411. </tr>
  412. </tbody>
  413. </table>
  414. <h5 class="returns">Returns</h5>
  415. <table class="table table-bordered table-striped table-condensed">
  416. <thead>
  417. <tr>
  418. <th>Type</th>
  419. <th>Description</th>
  420. </tr>
  421. </thead>
  422. <tbody>
  423. <tr>
  424. <td><span class="xref">System.Boolean</span></td>
  425. <td><code>true</code>, if the event was handled, <code>false</code> otherwise.</td>
  426. </tr>
  427. </tbody>
  428. </table>
  429. <a id="Terminal_Gui_Responder_ProcessColdKey_" data-uid="Terminal.Gui.Responder.ProcessColdKey*"></a>
  430. <h4 id="Terminal_Gui_Responder_ProcessColdKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Responder.ProcessColdKey(Terminal.Gui.KeyEvent)">ProcessColdKey(KeyEvent)</h4>
  431. <div class="markdown level1 summary">
  432. This method can be overwritten by views that
  433. want to provide accelerator functionality
  434. (Alt-key for example), but without
  435. interefering with normal ProcessKey behavior.
  436. </div>
  437. <div class="markdown level1 conceptual"></div>
  438. <h5 class="decalaration">Declaration</h5>
  439. <div class="codewrapper">
  440. <pre><code class="lang-csharp hljs">public virtual bool ProcessColdKey(KeyEvent keyEvent)</code></pre>
  441. </div>
  442. <h5 class="parameters">Parameters</h5>
  443. <table class="table table-bordered table-striped table-condensed">
  444. <thead>
  445. <tr>
  446. <th>Type</th>
  447. <th>Name</th>
  448. <th>Description</th>
  449. </tr>
  450. </thead>
  451. <tbody>
  452. <tr>
  453. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  454. <td><span class="parametername">keyEvent</span></td>
  455. <td>Contains the details about the key that produced the event.</td>
  456. </tr>
  457. </tbody>
  458. </table>
  459. <h5 class="returns">Returns</h5>
  460. <table class="table table-bordered table-striped table-condensed">
  461. <thead>
  462. <tr>
  463. <th>Type</th>
  464. <th>Description</th>
  465. </tr>
  466. </thead>
  467. <tbody>
  468. <tr>
  469. <td><span class="xref">System.Boolean</span></td>
  470. <td></td>
  471. </tr>
  472. </tbody>
  473. </table>
  474. <h5 id="Terminal_Gui_Responder_ProcessColdKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  475. <div class="markdown level1 remarks">
  476. <p>
  477. After keys are sent to the subviews on the
  478. current view, all the view are
  479. processed and the key is passed to the views
  480. to allow some of them to process the keystroke
  481. as a cold-key. </p>
  482. <p>
  483. This functionality is used, for example, by
  484. default buttons to act on the enter key.
  485. Processing this as a hot-key would prevent
  486. non-default buttons from consuming the enter
  487. keypress when they have the focus.
  488. </p>
  489. </div>
  490. <a id="Terminal_Gui_Responder_ProcessHotKey_" data-uid="Terminal.Gui.Responder.ProcessHotKey*"></a>
  491. <h4 id="Terminal_Gui_Responder_ProcessHotKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Responder.ProcessHotKey(Terminal.Gui.KeyEvent)">ProcessHotKey(KeyEvent)</h4>
  492. <div class="markdown level1 summary">
  493. This method can be overwritten by view that
  494. want to provide accelerator functionality
  495. (Alt-key for example).
  496. </div>
  497. <div class="markdown level1 conceptual"></div>
  498. <h5 class="decalaration">Declaration</h5>
  499. <div class="codewrapper">
  500. <pre><code class="lang-csharp hljs">public virtual bool ProcessHotKey(KeyEvent kb)</code></pre>
  501. </div>
  502. <h5 class="parameters">Parameters</h5>
  503. <table class="table table-bordered table-striped table-condensed">
  504. <thead>
  505. <tr>
  506. <th>Type</th>
  507. <th>Name</th>
  508. <th>Description</th>
  509. </tr>
  510. </thead>
  511. <tbody>
  512. <tr>
  513. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  514. <td><span class="parametername">kb</span></td>
  515. <td></td>
  516. </tr>
  517. </tbody>
  518. </table>
  519. <h5 class="returns">Returns</h5>
  520. <table class="table table-bordered table-striped table-condensed">
  521. <thead>
  522. <tr>
  523. <th>Type</th>
  524. <th>Description</th>
  525. </tr>
  526. </thead>
  527. <tbody>
  528. <tr>
  529. <td><span class="xref">System.Boolean</span></td>
  530. <td></td>
  531. </tr>
  532. </tbody>
  533. </table>
  534. <h5 id="Terminal_Gui_Responder_ProcessHotKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  535. <div class="markdown level1 remarks">
  536. <p>
  537. Before keys are sent to the subview on the
  538. current view, all the views are
  539. processed and the key is passed to the widgets
  540. to allow some of them to process the keystroke
  541. as a hot-key. </p>
  542. <p>
  543. For example, if you implement a button that
  544. has a hotkey ok &quot;o&quot;, you would catch the
  545. combination Alt-o here. If the event is
  546. caught, you must return true to stop the
  547. keystroke from being dispatched to other
  548. views.
  549. </p>
  550. </div>
  551. <a id="Terminal_Gui_Responder_ProcessKey_" data-uid="Terminal.Gui.Responder.ProcessKey*"></a>
  552. <h4 id="Terminal_Gui_Responder_ProcessKey_Terminal_Gui_KeyEvent_" data-uid="Terminal.Gui.Responder.ProcessKey(Terminal.Gui.KeyEvent)">ProcessKey(KeyEvent)</h4>
  553. <div class="markdown level1 summary">
  554. If the view is focused, gives the view a
  555. chance to process the keystroke.
  556. </div>
  557. <div class="markdown level1 conceptual"></div>
  558. <h5 class="decalaration">Declaration</h5>
  559. <div class="codewrapper">
  560. <pre><code class="lang-csharp hljs">public virtual bool ProcessKey(KeyEvent keyEvent)</code></pre>
  561. </div>
  562. <h5 class="parameters">Parameters</h5>
  563. <table class="table table-bordered table-striped table-condensed">
  564. <thead>
  565. <tr>
  566. <th>Type</th>
  567. <th>Name</th>
  568. <th>Description</th>
  569. </tr>
  570. </thead>
  571. <tbody>
  572. <tr>
  573. <td><a class="xref" href="Terminal.Gui.KeyEvent.html">KeyEvent</a></td>
  574. <td><span class="parametername">keyEvent</span></td>
  575. <td>Contains the details about the key that produced the event.</td>
  576. </tr>
  577. </tbody>
  578. </table>
  579. <h5 class="returns">Returns</h5>
  580. <table class="table table-bordered table-striped table-condensed">
  581. <thead>
  582. <tr>
  583. <th>Type</th>
  584. <th>Description</th>
  585. </tr>
  586. </thead>
  587. <tbody>
  588. <tr>
  589. <td><span class="xref">System.Boolean</span></td>
  590. <td></td>
  591. </tr>
  592. </tbody>
  593. </table>
  594. <h5 id="Terminal_Gui_Responder_ProcessKey_Terminal_Gui_KeyEvent__remarks">Remarks</h5>
  595. <div class="markdown level1 remarks">
  596. <p>
  597. Views can override this method if they are
  598. interested in processing the given keystroke.
  599. If they consume the keystroke, they must
  600. return true to stop the keystroke from being
  601. processed by other widgets or consumed by the
  602. widget engine. If they return false, the
  603. keystroke will be passed using the ProcessColdKey
  604. method to other views to process.
  605. </p>
  606. <p>
  607. The View implementation does nothing but return false,
  608. so it is not necessary to call base.ProcessKey if you
  609. derive directly from View, but you should if you derive
  610. other View subclasses.
  611. </p>
  612. </div>
  613. </article>
  614. </div>
  615. <div class="hidden-sm col-md-2" role="complementary">
  616. <div class="sideaffix">
  617. <div class="contribution">
  618. <ul class="nav">
  619. </ul>
  620. </div>
  621. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  622. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  623. </nav>
  624. </div>
  625. </div>
  626. </div>
  627. </div>
  628. <footer>
  629. <div class="grad-bottom"></div>
  630. <div class="footer">
  631. <div class="container">
  632. <span class="pull-right">
  633. <a href="#top">Back to top</a>
  634. </span>
  635. <span>Generated by <strong>DocFX</strong></span>
  636. </div>
  637. </div>
  638. </footer>
  639. </div>
  640. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  641. <script type="text/javascript" src="../../styles/docfx.js"></script>
  642. <script type="text/javascript" src="../../styles/main.js"></script>
  643. </body>
  644. </html>