#include <key_event_args.h>
Provides data for the key_down or key_up event.
- Namespace
- xtd::forms
- Library
- xtd.forms
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_event_args() [1/2]
xtd::forms::key_event_args::key_event_args |
( |
| ) |
|
|
default |
◆ key_event_args() [2/2]
Initializes a new instance of the key_event_args class.
- Parameters
-
key_data | A xtd::forms::keys representing the key that was pressed, combined with any modifier flags that indicate which CMD, CTRL, SHIFT, and ALT keys were pressed at the same time. Possible values are obtained by applying the bitwise OR (|) operator to constants from the Keys enumeration. |
◆ alt()
bool xtd::forms::key_event_args::alt |
( |
| ) |
const |
|
inline |
Gets a value indicating whether the ALT key was pressed.
- Returns
- true if the ALT key was pressed; otherwise, false.
◆ command()
bool xtd::forms::key_event_args::command |
( |
| ) |
const |
|
inline |
Gets a value indicating whether the CMD key was pressed.
- Returns
- true if the CMD key was pressed; otherwise, false.
◆ control()
bool xtd::forms::key_event_args::control |
( |
| ) |
const |
|
inline |
Gets a value indicating whether the CTRL key was pressed.
- Returns
- true if the CTRL key was pressed; otherwise, false.
◆ handled() [1/2]
bool xtd::forms::key_event_args::handled |
( |
| ) |
const |
|
inline |
Gets a value indicating whether the event was handled.
- Returns
- true to bypass the control's default handling; otherwise, false to also pass the event along to the default control handler.
◆ handled() [2/2]
void xtd::forms::key_event_args::handled |
( |
bool |
handled | ) |
|
|
inline |
Sets a value indicating whether the event was handled.
- Parameters
-
handled | true to bypass the control's default handling; otherwise, false to also pass the event along to the default control handler. |
◆ key_code()
keys xtd::forms::key_event_args::key_code |
( |
| ) |
const |
|
inline |
Gets the keyboard code for a key_down or key_up event.
- Returns
- A xtd::forms::keys value that is the key code for the event.
◆ key_data()
keys xtd::forms::key_event_args::key_data |
( |
| ) |
const |
|
inline |
Gets the key data for a key_down or key_up event.
- Returns
- A xtd::forms::keys representing the key code for the key that was pressed, combined with modifier flags that indicate which combination of CMD, CTRL, SHIFT, and ALT keys was pressed at the same time.
◆ key_value()
int xtd::forms::key_event_args::key_value |
( |
| ) |
const |
|
inline |
Gets the keyboard value for a key_down or key_up event.
- Returns
- The integer representation of the key_code property.
◆ modifiers()
keys xtd::forms::key_event_args::modifiers |
( |
| ) |
const |
|
inline |
Gets the modifier flags for a key_down or key_up event. The flags indicate which combination of CMD, CTRL, SHIFT, and ALT keys was pressed.
- Returns
- A xtd::forms::keys value representing one or more modifier flags.
◆ shift()
bool xtd::forms::key_event_args::shift |
( |
| ) |
const |
|
inline |
Gets a value indicating whether the SHIFT key was pressed.
- Returns
- true if the SHIFT key was pressed; otherwise, false.
◆ suppress_key_press() [1/2]
bool xtd::forms::key_event_args::suppress_key_press |
( |
| ) |
const |
|
inline |
Gets a value indicating whether the key event should be passed on to the underlying control.
- Returns
- true if the key event should not be sent to the control; otherwise, false.
◆ suppress_key_press() [2/2]
void xtd::forms::key_event_args::suppress_key_press |
( |
bool |
suppress_key_press | ) |
|
|
inline |
Sets a value indicating whether the key event should be passed on to the underlying control.
- Parameters
-
suppress_key_press | true if the key event should not be sent to the control; otherwise, false. |
The documentation for this class was generated from the following file: