1 \section{\class{wxKeyEvent
}}\label{wxkeyevent
}
3 This event class contains information about keypress (character) events. See
\helpref{wxWindow::OnChar
}{wxwindowonchar
}.
5 \wxheading{Derived from
}
7 \helpref{wxEvent
}{wxevent
}
9 \wxheading{Event table macros
}
11 To process a key event, use these event handler macros to direct input to member
12 functions that take a wxKeyEvent argument.
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.
}
20 \latexignore{\rtfignore{\wxheading{Members
}}}
22 \membersection{wxKeyEvent::m
\_altDown}
24 \member{bool
}{m
\_altDown}
26 TRUE if the Alt key is pressed down.
28 \membersection{wxKeyEvent::m
\_controlDown}
30 \member{bool
}{m
\_controlDown}
32 TRUE if control is pressed down.
34 \membersection{wxKeyEvent::m
\_keyCode}
36 \member{long
}{m
\_keyCode}
38 Virtual keycode. An enumerated type, one of:
117 \membersection{wxKeyEvent::m
\_metaDown}
119 \member{bool
}{m
\_metaDown}
121 TRUE if the Meta key is pressed down.
123 \membersection{wxKeyEvent::m
\_shiftDown}
125 \member{bool
}{m
\_shiftDown}
127 TRUE if shift is pressed down.
129 \membersection{wxKeyEvent::m
\_x}
133 X position of the event.
135 \membersection{wxKeyEvent::m
\_y}
139 Y position of the event.
141 \membersection{wxKeyEvent::wxKeyEvent
}
143 \func{}{wxKeyEvent
}{\param{WXTYPE
}{ keyEventType
}}
145 Constructor. Currently, the only valid event types are wxEVT
\_CHAR and wxEVT
\_CHAR\_HOOK.
147 \membersection{wxKeyEvent::AltDown
}
149 \func{bool
}{AltDown
}{\void}
151 Returns TRUE if the Alt key was down at the time of the key event.
153 \membersection{wxKeyEvent::ControlDown
}
155 \func{bool
}{ControlDown
}{\void}
157 Returns TRUE if the control key was down at the time of the key event.
159 \membersection{wxKeyEvent::GetX
}
161 \func{float
}{GetX
}{\void}
163 Returns the X position of the event.
165 \membersection{wxKeyEvent::GetY
}
167 \func{float
}{GetY
}{\void}
169 Returns the Y position of the event.
171 \membersection{wxKeyEvent::KeyCode
}
173 \func{long
}{KeyCode
}{\void}
175 Returns the virtual key code. ASCII events return normal ASCII values,
176 while non-ASCII events return values such as
{\bf WXK
\_LEFT} for the
177 left cursor key. See
{\tt wx
\_defs.h
} for a full list of the virtual key codes.
179 \membersection{wxKeyEvent::MetaDown
}
181 \func{bool
}{MetaDown
}{\void}
183 Returns TRUE if the Meta key was down at the time of the key event.
185 \membersection{wxKeyEvent::Position
}
187 \func{void
}{Position
}{\param{float *
}{x
},
\param{float *
}{y
}}
189 Obtains the position at which the key was pressed.
191 \membersection{wxKeyEvent::ShiftDown
}
193 \func{bool
}{ShiftDown
}{\void}
195 Returns TRUE if the shift key was down at the time of the key event.