#include <key_press_event_args.h>
Provides data for the key_press event.
- Namespace
- xtd::forms
- Library
- xtd.forms
- Note
- Some controls will process certain key strokes on key_down. For example, rich_text_box processes the Enter key before key_press is called. In such cases, you cannot cancel the key_press event, and must cancel the key stroke from key_down instead.
Inherits xtd::event_args.
|
static const event_args | empty |
| Provides a value to use with events that do not have event data. More...
|
|
static bool | equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are considered equal. More...
|
|
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are the same instance. More...
|
|
◆ key_press_event_args() [1/2]
xtd::forms::key_press_event_args::key_press_event_args |
( |
| ) |
|
|
default |
Initializes a new instance of the KeyPressEventArgs class.
◆ key_press_event_args() [2/2]
xtd::forms::key_press_event_args::key_press_event_args |
( |
char32_t |
key_char | ) |
|
|
inline |
Initializes a new instance of the KeyPressEventArgs class.
- Parameters
-
key_char | The ASCII character corresponding to the key the user pressed. |
◆ handled() [1/2]
bool xtd::forms::key_press_event_args::handled |
( |
| ) |
const |
|
inline |
Gets a value indicating whether the key_press event was handled.
- Returns
- true if the event is handled; otherwise, false.
◆ handled() [2/2]
void xtd::forms::key_press_event_args::handled |
( |
bool |
handled | ) |
|
|
inline |
Sets a value indicating whether the key_press event was handled.
- Parameters
-
handled | true if the event is handled; otherwise, false. |
◆ key_char() [1/2]
char32_t xtd::forms::key_press_event_args::key_char |
( |
| ) |
const |
|
inline |
Gets the character corresponding to the key pressed.
- Returns
- The ASCII character that is composed. For example, if the user presses SHIFT + K, this property returns an uppercase K.
- Note
- For information about how to detect any of the non-character keys mentioned above, see the key_event_args class.
◆ key_char() [2/2]
void xtd::forms::key_press_event_args::key_char |
( |
char32_t |
key_char | ) |
|
|
inline |
Sets the character corresponding to the key pressed.
- Parameters
-
key_char | The ASCII character that is composed. For example, if the user presses SHIFT + K, this property returns an uppercase K. |
- Note
- For information about how to detect any of the non-character keys mentioned above, see the key_event_args class.
The documentation for this class was generated from the following file: