forked from khchen/wNim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wKeyEvent.html
195 lines (162 loc) · 11.6 KB
/
wKeyEvent.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- This file is generated by Nim. -->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Favicon -->
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
<link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
<!-- Google fonts -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
<link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
<!-- CSS -->
<title>wKeyEvent</title>
<link rel="stylesheet" type="text/css" href="nimdoc.out.css">
<script type="text/javascript" src="dochack.js"></script>
<script type="text/javascript">
function main() {
var pragmaDots = document.getElementsByClassName("pragmadots");
for (var i = 0; i < pragmaDots.length; i++) {
pragmaDots[i].onclick = function(event) {
// Hide tease
event.target.parentNode.style.display = "none";
// Show actual
event.target.parentNode.nextElementSibling.style.display = "inline";
}
}
const toggleSwitch = document.querySelector('.theme-switch input[type="checkbox"]');
function switchTheme(e) {
if (e.target.checked) {
document.documentElement.setAttribute('data-theme', 'dark');
localStorage.setItem('theme', 'dark');
} else {
document.documentElement.setAttribute('data-theme', 'light');
localStorage.setItem('theme', 'light');
}
}
toggleSwitch.addEventListener('change', switchTheme, false);
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
document.documentElement.setAttribute('data-theme', "dark");
toggleSwitch.checked = true;
} else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches) {
document.documentElement.setAttribute('data-theme', "light");
toggleSwitch.checked = false;
} else {
const currentTheme = localStorage.getItem('theme') ? localStorage.getItem('theme') : null;
if (currentTheme) {
document.documentElement.setAttribute('data-theme', currentTheme);
if (currentTheme === 'dark') {
toggleSwitch.checked = true;
}
}
}
}
</script>
</head>
<body onload="main()">
<div class="document" id="documentId">
<div class="container">
<h1 class="title">wKeyEvent</h1>
<div class="row">
<div class="three columns">
<div class="theme-switch-wrapper">
<label class="theme-switch" for="checkbox">
<input type="checkbox" id="checkbox" />
<div class="slider round"></div>
</label>
<em>Dark Mode</em>
</div>
<div id="global-links">
<ul class="simple">
<li>
<a href="https://github.com/khchen/wNim">Github Project</a>
</li>
<li>
<a href="wNim.html">Main Page</a>
</li>
</ul>
</div>
<ul class="simple simple-toc" id="toc-list">
<li>
<a class="reference reference-toplevel" href="#10" id="60">Consts</a>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#wEvent_Char"
title="wEvent_Char = 0x00000102"><wbr />w<wbr />Event_<wbr />Char<span class="attachedType"></span></a></li>
<li><a class="reference" href="#wEvent_KeyDown"
title="wEvent_KeyDown = 0x00000100"><wbr />w<wbr />Event_<wbr />Key<wbr />Down<span class="attachedType"></span></a></li>
<li><a class="reference" href="#wEvent_KeyUp"
title="wEvent_KeyUp = 0x00000101"><wbr />w<wbr />Event_<wbr />Key<wbr />Up<span class="attachedType"></span></a></li>
<li><a class="reference" href="#wEvent_SysKeyDown"
title="wEvent_SysKeyDown = 0x00000104"><wbr />w<wbr />Event_<wbr />Sys<wbr />Key<wbr />Down<span class="attachedType"></span></a></li>
<li><a class="reference" href="#wEvent_SysKeyUp"
title="wEvent_SysKeyUp = 0x00000105"><wbr />w<wbr />Event_<wbr />Sys<wbr />Key<wbr />Up<span class="attachedType"></span></a></li>
<li><a class="reference" href="#wEvent_KeyFirst"
title="wEvent_KeyFirst = 0x00000100"><wbr />w<wbr />Event_<wbr />Key<wbr />First<span class="attachedType"></span></a></li>
<li><a class="reference" href="#wEvent_KeyLast"
title="wEvent_KeyLast = 0x00000109"><wbr />w<wbr />Event_<wbr />Key<wbr />Last<span class="attachedType"></span></a></li>
</ul>
</li>
<li>
<a class="reference reference-toplevel" href="#14" id="64">Methods</a>
<ul class="simple simple-toc-section">
<li><a class="reference" href="#getKeyCode.e%2CwKeyEvent"
title="getKeyCode(self: wKeyEvent): int"><wbr />get<wbr />Key<wbr />Code<span class="attachedType"></span></a></li>
</ul>
</li>
</ul>
</div>
<div class="nine columns" id="content">
<div id="tocRoot"></div>
<p class="module-desc">These events are generated by wWindow when the user pressed the keyboard.<table class="docinfo" frame="void" rules="none"><col class="docinfo-name" /><col class="docinfo-content" /><tbody valign="top"><tr><th class="docinfo-name">Superclass:</th><td><a class="reference external" href="wEvent.html">wEvent</a></td></tr>
</tbody></table><table class="docinfo" frame="void" rules="none"><col class="docinfo-name" /><col class="docinfo-content" /><tbody valign="top"><tr><th class="docinfo-name">Seealso:</th><td><a class="reference external" href="wWindow.html">wWindow</a></td></tr>
</tbody></table><table class="docinfo" frame="void" rules="none"><col class="docinfo-name" /><col class="docinfo-content" /><tbody valign="top"><tr><th class="docinfo-name">Events:</th><td><table border="1" class="docutils"><tr><th>wKeyEvent</th><th>Description</th></tr>
<tr><td>wEvent_Char</td><td>A focused Window receives a char.</td></tr>
<tr><td>wEvent_KeyDown</td><td>A key was pressed.</td></tr>
<tr><td>wEvent_KeyUp</td><td>A key was released.</td></tr>
<tr><td>wEvent_SysKeyDown</td><td>Presses the F10 key or holds down the ALT key and then presses another key.</td></tr>
<tr><td>wEvent_SysKeyUp</td><td>Releases a key that was pressed while the ALT key was held down.</td></tr>
</table></td></tr>
</tbody></table></p>
<div class="section" id="10">
<h1><a class="toc-backref" href="#10">Consts</a></h1>
<dl class="item">
<a id="wEvent_Char"></a>
<dt><pre><a href="wKeyEvent.html#wEvent_Char"><span class="Identifier">wEvent_Char</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000102</span></pre></dt>
<a id="wEvent_KeyDown"></a>
<dt><pre><a href="wKeyEvent.html#wEvent_KeyDown"><span class="Identifier">wEvent_KeyDown</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000100</span></pre></dt>
<a id="wEvent_KeyUp"></a>
<dt><pre><a href="wKeyEvent.html#wEvent_KeyUp"><span class="Identifier">wEvent_KeyUp</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000101</span></pre></dt>
<a id="wEvent_SysKeyDown"></a>
<dt><pre><a href="wKeyEvent.html#wEvent_SysKeyDown"><span class="Identifier">wEvent_SysKeyDown</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000104</span></pre></dt>
<a id="wEvent_SysKeyUp"></a>
<dt><pre><a href="wKeyEvent.html#wEvent_SysKeyUp"><span class="Identifier">wEvent_SysKeyUp</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000105</span></pre></dt>
<a id="wEvent_KeyFirst"></a>
<dt><pre><a href="wKeyEvent.html#wEvent_KeyFirst"><span class="Identifier">wEvent_KeyFirst</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000100</span></pre></dt>
<a id="wEvent_KeyLast"></a>
<dt><pre><a href="wKeyEvent.html#wEvent_KeyLast"><span class="Identifier">wEvent_KeyLast</span></a> <span class="Other">=</span> <span class="DecNumber">0x00000109</span></pre></dt>
</dl></div>
<div class="section" id="14">
<h1><a class="toc-backref" href="#14">Methods</a></h1>
<dl class="item">
<a id="getKeyCode.e,wKeyEvent"></a>
<dt><pre><span class="Keyword">method</span> <a href="#getKeyCode.e%2CwKeyEvent"><span class="Identifier">getKeyCode</span></a><span class="Other">(</span><span class="Identifier">self</span><span class="Other">:</span> <a href="wTypes.html#wKeyEvent"><span class="Identifier">wKeyEvent</span></a><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">inline</span><span class="Other">,</span> <span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
<dd>
Returns the key code of the key that generated this event.
</dd>
</dl></div>
</div>
</div>
<div class="row">
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim.</small>
</div>
</div>
</div>
</div>
</body>
</html>