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. See
\helpref{Keycodes
}{keycodes
} for a list of identifiers.
40 \membersection{wxKeyEvent::m
\_metaDown}
42 \member{bool
}{m
\_metaDown}
44 TRUE if the Meta key is pressed down.
46 \membersection{wxKeyEvent::m
\_shiftDown}
48 \member{bool
}{m
\_shiftDown}
50 TRUE if shift is pressed down.
52 \membersection{wxKeyEvent::m
\_x}
56 X position of the event.
58 \membersection{wxKeyEvent::m
\_y}
62 Y position of the event.
64 \membersection{wxKeyEvent::wxKeyEvent
}
66 \func{}{wxKeyEvent
}{\param{WXTYPE
}{ keyEventType
}}
68 Constructor. Currently, the only valid event types are wxEVT
\_CHAR and wxEVT
\_CHAR\_HOOK.
70 \membersection{wxKeyEvent::AltDown
}
72 \func{bool
}{AltDown
}{\void}
74 Returns TRUE if the Alt key was down at the time of the key event.
76 \membersection{wxKeyEvent::ControlDown
}
78 \func{bool
}{ControlDown
}{\void}
80 Returns TRUE if the control key was down at the time of the key event.
82 \membersection{wxKeyEvent::GetX
}
84 \func{float
}{GetX
}{\void}
86 Returns the X position of the event.
88 \membersection{wxKeyEvent::GetY
}
90 \func{float
}{GetY
}{\void}
92 Returns the Y position of the event.
94 \membersection{wxKeyEvent::KeyCode
}
96 \func{long
}{KeyCode
}{\void}
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.
102 \membersection{wxKeyEvent::MetaDown
}
104 \func{bool
}{MetaDown
}{\void}
106 Returns TRUE if the Meta key was down at the time of the key event.
108 \membersection{wxKeyEvent::Position
}
110 \func{void
}{Position
}{\param{float *
}{x
},
\param{float *
}{y
}}
112 Obtains the position at which the key was pressed.
114 \membersection{wxKeyEvent::ShiftDown
}
116 \func{bool
}{ShiftDown
}{\void}
118 Returns TRUE if the shift key was down at the time of the key event.