]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/keyevent.tex
Removed unnecessary (and buggy) additions. Sorry Guilhem!
[wxWidgets.git] / docs / latex / wx / keyevent.tex
1 \section{\class{wxKeyEvent}}\label{wxkeyevent}
2
3 This event class contains information about keypress (character) events.
4
5 \wxheading{Derived from}
6
7 \helpref{wxEvent}{wxevent}
8
9 \wxheading{Event table macros}
10
11 To process a key event, use these event handler macros to direct input to member
12 functions that take a wxKeyEvent argument.
13
14 \twocolwidtha{7cm}
15 \begin{twocollist}\itemsep=0pt
16 \twocolitem{{\bf EVT\_CHAR(func)}}{Process a wxEVT\_CHAR event (an ASCII key has been pressed).}
17 \twocolitem{{\bf EVT\_KEY\_DOWN(func)}}{Process a wxEVT\_KEY\_DOWN event (any key has been pressed).}
18 \twocolitem{{\bf EVT\_KEY\_UP(func)}}{Process a wxEVT\_KEY\_UP event (any key has been released).}
19 \twocolitem{{\bf EVT\_CHAR(func)}}{Process a wxEVT\_CHAR event.}
20 \twocolitem{{\bf EVT\_CHAR\_HOOK(func)}}{Process a wxEVT\_CHAR\_HOOK event.}
21 \end{twocollist}%
22
23 \wxheading{See also}
24
25 \helpref{wxWindow::OnChar}{wxwindowonchar},
26 \helpref{wxWindow::OnCharHook}{wxwindowoncharhook},
27 \helpref{wxWindow::OnKeyDown}{wxwindowonkeydown},
28 \helpref{wxWindow::OnKeyUp}{wxwindowonkeyup}
29
30 \latexignore{\rtfignore{\wxheading{Members}}}
31
32 \membersection{wxKeyEvent::m\_altDown}
33
34 \member{bool}{m\_altDown}
35
36 TRUE if the Alt key is pressed down.
37
38 \membersection{wxKeyEvent::m\_controlDown}
39
40 \member{bool}{m\_controlDown}
41
42 TRUE if control is pressed down.
43
44 \membersection{wxKeyEvent::m\_keyCode}
45
46 \member{long}{m\_keyCode}
47
48 Virtual keycode. See \helpref{Keycodes}{keycodes} for a list of identifiers.
49
50 \membersection{wxKeyEvent::m\_metaDown}
51
52 \member{bool}{m\_metaDown}
53
54 TRUE if the Meta key is pressed down.
55
56 \membersection{wxKeyEvent::m\_shiftDown}
57
58 \member{bool}{m\_shiftDown}
59
60 TRUE if shift is pressed down.
61
62 \membersection{wxKeyEvent::m\_x}
63
64 \member{int}{m\_x}
65
66 X position of the event.
67
68 \membersection{wxKeyEvent::m\_y}
69
70 \member{int}{m\_y}
71
72 Y position of the event.
73
74 \membersection{wxKeyEvent::wxKeyEvent}
75
76 \func{}{wxKeyEvent}{\param{WXTYPE}{ keyEventType}}
77
78 Constructor. Currently, the only valid event types are wxEVT\_CHAR and wxEVT\_CHAR\_HOOK.
79
80 \membersection{wxKeyEvent::AltDown}
81
82 \func{bool}{AltDown}{\void}
83
84 Returns TRUE if the Alt key was down at the time of the key event.
85
86 \membersection{wxKeyEvent::ControlDown}
87
88 \func{bool}{ControlDown}{\void}
89
90 Returns TRUE if the control key was down at the time of the key event.
91
92 \membersection{wxKeyEvent::GetX}
93
94 \func{float}{GetX}{\void}
95
96 Returns the X position of the event.
97
98 \membersection{wxKeyEvent::GetY}
99
100 \func{float}{GetY}{\void}
101
102 Returns the Y position of the event.
103
104 \membersection{wxKeyEvent::KeyCode}
105
106 \func{long}{KeyCode}{\void}
107
108 Returns the virtual key code. ASCII events return normal ASCII values,
109 while non-ASCII events return values such as {\bf WXK\_LEFT} for the
110 left cursor key. See \helpref{Keycodes}{keycodes} for a full list of the virtual key codes.
111
112 \membersection{wxKeyEvent::MetaDown}
113
114 \func{bool}{MetaDown}{\void}
115
116 Returns TRUE if the Meta key was down at the time of the key event.
117
118 \membersection{wxKeyEvent::Position}
119
120 \func{void}{Position}{\param{float *}{x}, \param{float *}{y}}
121
122 Obtains the position at which the key was pressed.
123
124 \membersection{wxKeyEvent::ShiftDown}
125
126 \func{bool}{ShiftDown}{\void}
127
128 Returns TRUE if the shift key was down at the time of the key event.
129
130