summaryrefslogtreecommitdiff
path: root/freebsdtvision/doc/html/structKeyDownEvent.html
blob: 79a8053c8f0999bc87b75d7ac8053ec126ef22bc (plain)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>KeyDownEvent struct Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
<hr><h1>KeyDownEvent Struct Reference</h1>Information about key presses. 
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="system_8h-source.html">system.h</a>&gt;</code>
<p>
<a href="structKeyDownEvent-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Public Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="ttypes_8h.html#a3">ulong</a>&nbsp;</td><td valign=bottom><a class="el" href="structKeyDownEvent.html#m2">controlKeyState</a></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="ttypes_8h.html#a0">ushort</a>&nbsp;</td><td valign=bottom><a class="el" href="structKeyDownEvent.html#m0">keyCode</a></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="structCharScanType.html">CharScanType</a>&nbsp;</td><td valign=bottom><a class="el" href="structKeyDownEvent.html#m1">charScan</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This structure stores information about key presses.
<p>
The KeyDownEvent structure is a union of keyCode (a ushort) and charScan (of type struct <a class="el" href="structCharScanType.html">CharScanType</a>). These two members represent two ways of viewing the same data: either as a scan code or as a key code.
<p>
Scan codes are what your program receives from the keyboard, while key codes are usually needed in a switch statement.
<p>
See file `<a class="el" href="tkeys_8h.html">tkeys.h</a>' for a list of keycodes. <dl compact><dt><b>See also: </b></dt><dd>
<a class="el" href="structTEvent.html">TEvent</a> </dl>
<p>

<p>
Definition at line <a class="el" href="system_8h-source.html#l00239">239</a> of file <a class="el" href="system_8h-source.html">system.h</a>.<hr><h2>Member Data Documentation</h2>
<a name="m1" doxytag="KeyDownEvent::charScan"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="structCharScanType.html">CharScanType</a> KeyDownEvent::charScan
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
The same as above, but splitted in its two components. <dl compact><dt><b>See also: </b></dt><dd>
<a class="el" href="structCharScanType.html">CharScanType</a> </dl>
<p>
Definition at line <a class="el" href="system_8h-source.html#l00254">254</a> of file <a class="el" href="system_8h-source.html">system.h</a>.    </td>
  </tr>
</table>
<a name="m2" doxytag="KeyDownEvent::controlKeyState"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="ttypes_8h.html#a3">ulong</a> KeyDownEvent::controlKeyState
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Stores the status of the control keys when the event happened. The following values define keyboard states, and can be used when examining the keyboard shift state:
<p>
<pre>
 Constant      Value  Meaning

 kbRightShift  0x0001 Set if the Right Shift key is currently down
 kbLeftShift   0x0002 Set if the Left Shift key is currently down
 kbCtrlShift   0x0004 Set if the Ctrl key is currently down
 kbAltShift    0x0008 Set if the Alt key is currently down
 kbScrollState 0x0010 Set if the keyboard is in the Scroll Lock state
 kbNumState    0x0020 Set if the keyboard is in the Num Lock state
 kbCapsState   0x0040 Set if the keyboard is in the Caps Lock state
 kbInsState    0x0080 Set if the keyboard is in the Ins Lock state
 </pre>
<p>
Its value is 0 if none of these keys was pressed. Warning: this information is not reliable. Its value depends on your operating system and libraries (gpm, ncurses). Usually only a subset of these flags are detected. See file `system.cc' for details. 
<p>
Definition at line <a class="el" href="system_8h-source.html#l00279">279</a> of file <a class="el" href="system_8h-source.html">system.h</a>.    </td>
  </tr>
</table>
<a name="m0" doxytag="KeyDownEvent::keyCode"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="ttypes_8h.html#a0">ushort</a> KeyDownEvent::keyCode
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This is the key code.
<p>
It is the concatenation of the scan code and the character code. <dl compact><dt><b>See also: </b></dt><dd>
<a class="el" href="structCharScanType.html">CharScanType</a> </dl>
<p>
Definition at line <a class="el" href="system_8h-source.html#l00249">249</a> of file <a class="el" href="system_8h-source.html">system.h</a>.    </td>
  </tr>
</table>
<hr>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="system_8h-source.html">system.h</a></ul>
<hr><address style="align: right;"><small>Generated on Wed Apr 2 22:13:14 2003 for TVision by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.18 </small></address>
</body>
</html>