]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/keyevent.tex
Added script to help make wxMotif via configure; nativdlg sample works again;
[wxWidgets.git] / docs / latex / wx / keyevent.tex
CommitLineData
a660d684
KB
1\section{\class{wxKeyEvent}}\label{wxkeyevent}
2
3This 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
11To process a key event, use these event handler macros to direct input to member
12functions 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
26TRUE if the Alt key is pressed down.
27
28\membersection{wxKeyEvent::m\_controlDown}
29
30\member{bool}{m\_controlDown}
31
32TRUE if control is pressed down.
33
34\membersection{wxKeyEvent::m\_keyCode}
35
36\member{long}{m\_keyCode}
37
3972fb49 38Virtual keycode. See \helpref{Keycodes}{keycodes} for a list of identifiers.
a660d684
KB
39
40\membersection{wxKeyEvent::m\_metaDown}
41
42\member{bool}{m\_metaDown}
43
44TRUE if the Meta key is pressed down.
45
46\membersection{wxKeyEvent::m\_shiftDown}
47
48\member{bool}{m\_shiftDown}
49
50TRUE if shift is pressed down.
51
52\membersection{wxKeyEvent::m\_x}
53
54\member{int}{m\_x}
55
56X position of the event.
57
58\membersection{wxKeyEvent::m\_y}
59
60\member{int}{m\_y}
61
62Y position of the event.
63
64\membersection{wxKeyEvent::wxKeyEvent}
65
66\func{}{wxKeyEvent}{\param{WXTYPE}{ keyEventType}}
67
68Constructor. 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
74Returns 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
80Returns 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
86Returns the X position of the event.
87
88\membersection{wxKeyEvent::GetY}
89
90\func{float}{GetY}{\void}
91
92Returns the Y position of the event.
93
94\membersection{wxKeyEvent::KeyCode}
95
96\func{long}{KeyCode}{\void}
97
98Returns the virtual key code. ASCII events return normal ASCII values,
99while non-ASCII events return values such as {\bf WXK\_LEFT} for the
3972fb49 100left cursor key. See \helpref{Keycodes}{keycodes} for a full list of the virtual key codes.
a660d684
KB
101
102\membersection{wxKeyEvent::MetaDown}
103
104\func{bool}{MetaDown}{\void}
105
106Returns 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
112Obtains the position at which the key was pressed.
113
114\membersection{wxKeyEvent::ShiftDown}
115
116\func{bool}{ShiftDown}{\void}
117
118Returns TRUE if the shift key was down at the time of the key event.
119
120