]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/keyevent.tex
Added dnd classes, data object classes, changed clipboard class doc,
[wxWidgets.git] / docs / latex / wx / keyevent.tex
1 \section{\class{wxKeyEvent}}\label{wxkeyevent}
2
3 This event class contains information about keypress (character) events. See \helpref{wxWindow::OnChar}{wxwindowonchar}.
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.}
17 \twocolitem{{\bf EVT\_CHAR\_HOOK(func)}}{Process a wxEVT\_CHAR\_HOOK event.}
18 \end{twocollist}%
19
20 \latexignore{\rtfignore{\wxheading{Members}}}
21
22 \membersection{wxKeyEvent::m\_altDown}
23
24 \member{bool}{m\_altDown}
25
26 TRUE if the Alt key is pressed down.
27
28 \membersection{wxKeyEvent::m\_controlDown}
29
30 \member{bool}{m\_controlDown}
31
32 TRUE if control is pressed down.
33
34 \membersection{wxKeyEvent::m\_keyCode}
35
36 \member{long}{m\_keyCode}
37
38 Virtual keycode. See \helpref{Keycodes}{keycodes} for a list of identifiers.
39
40 \membersection{wxKeyEvent::m\_metaDown}
41
42 \member{bool}{m\_metaDown}
43
44 TRUE if the Meta key is pressed down.
45
46 \membersection{wxKeyEvent::m\_shiftDown}
47
48 \member{bool}{m\_shiftDown}
49
50 TRUE if shift is pressed down.
51
52 \membersection{wxKeyEvent::m\_x}
53
54 \member{int}{m\_x}
55
56 X position of the event.
57
58 \membersection{wxKeyEvent::m\_y}
59
60 \member{int}{m\_y}
61
62 Y position of the event.
63
64 \membersection{wxKeyEvent::wxKeyEvent}
65
66 \func{}{wxKeyEvent}{\param{WXTYPE}{ keyEventType}}
67
68 Constructor. Currently, the only valid event types are wxEVT\_CHAR and wxEVT\_CHAR\_HOOK.
69
70 \membersection{wxKeyEvent::AltDown}
71
72 \func{bool}{AltDown}{\void}
73
74 Returns TRUE if the Alt key was down at the time of the key event.
75
76 \membersection{wxKeyEvent::ControlDown}
77
78 \func{bool}{ControlDown}{\void}
79
80 Returns TRUE if the control key was down at the time of the key event.
81
82 \membersection{wxKeyEvent::GetX}
83
84 \func{float}{GetX}{\void}
85
86 Returns the X position of the event.
87
88 \membersection{wxKeyEvent::GetY}
89
90 \func{float}{GetY}{\void}
91
92 Returns the Y position of the event.
93
94 \membersection{wxKeyEvent::KeyCode}
95
96 \func{long}{KeyCode}{\void}
97
98 Returns the virtual key code. ASCII events return normal ASCII values,
99 while non-ASCII events return values such as {\bf WXK\_LEFT} for the
100 left cursor key. See \helpref{Keycodes}{keycodes} for a full list of the virtual key codes.
101
102 \membersection{wxKeyEvent::MetaDown}
103
104 \func{bool}{MetaDown}{\void}
105
106 Returns TRUE if the Meta key was down at the time of the key event.
107
108 \membersection{wxKeyEvent::Position}
109
110 \func{void}{Position}{\param{float *}{x}, \param{float *}{y}}
111
112 Obtains the position at which the key was pressed.
113
114 \membersection{wxKeyEvent::ShiftDown}
115
116 \func{bool}{ShiftDown}{\void}
117
118 Returns TRUE if the shift key was down at the time of the key event.
119
120