class KeyEvent

Defined at line 1071 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

A Keyboard event generated to reflect key input. `timestamp` and `type` are required.

At least one of `key` and `key_meaning` must be set for a valid event.

Public Members

static const fidl_type_t * FidlType

Public Methods

bool IsEmpty ()

Returns whether no field is set.

bool has_timestamp ()

Defined at line 1084 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

int64_t * mutable_timestamp ()

Time in nanoseconds when the event was recorded, in the `CLOCK_MONOTONIC` time base.

The timestamp is **required** on every key event, and users can expect that it

will always be present.

Defined at line 1091 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

void clear_timestamp ()

Defined at line 1099 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

bool has_type ()

Defined at line 1112 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

::fuchsia::ui::input3::KeyEventType * mutable_type ()

Type of event.

Defined at line 1117 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

void clear_type ()

Defined at line 1125 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

const ::fuchsia::input::Key & key ()

Identifies the key ignoring modifiers, layout, prior key events, etc. This is called

the "physical key" on some platforms. In cases where the key event did not originate

from a physical keyboard (e.g. onscreen keyboard) this field may be empty.

Defined at line 1136 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

bool has_key ()

Defined at line 1140 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

::fuchsia::input::Key * mutable_key ()

Identifies the key ignoring modifiers, layout, prior key events, etc. This is called

the "physical key" on some platforms. In cases where the key event did not originate

from a physical keyboard (e.g. onscreen keyboard) this field may be empty.

Defined at line 1147 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

void clear_key ()

Defined at line 1155 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

const ::fuchsia::ui::input3::Modifiers & modifiers ()

Modifiers in effect at the time of the event.

Example:

CapsLock is off, user presses CapsLock, then A, then releases both.

Event sequence is as follows:

1. type: Pressed, key: CapsLock, modifiers: None

2. type: Pressed, key: A, modifiers: CapsLock

3. type: Released, key: CapsLock, modifiers: CapsLock

4. type: Released, key: A, modifiers: CapsLock

CapsLock is on, user presses CapsLock, then A, then releases both.

1. type: Pressed, key: CapsLock, modifiers: CapsLock

2. type: Pressed, key: A, modifiers: None

3. type: Released, key: CapsLock, modifiers: None

4. type: Released, key: A, modifiers: None

Defined at line 1177 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

bool has_modifiers ()

Defined at line 1181 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

::fuchsia::ui::input3::Modifiers * mutable_modifiers ()

Modifiers in effect at the time of the event.

Example:

CapsLock is off, user presses CapsLock, then A, then releases both.

Event sequence is as follows:

1. type: Pressed, key: CapsLock, modifiers: None

2. type: Pressed, key: A, modifiers: CapsLock

3. type: Released, key: CapsLock, modifiers: CapsLock

4. type: Released, key: A, modifiers: CapsLock

CapsLock is on, user presses CapsLock, then A, then releases both.

1. type: Pressed, key: CapsLock, modifiers: CapsLock

2. type: Pressed, key: A, modifiers: None

3. type: Released, key: CapsLock, modifiers: None

4. type: Released, key: A, modifiers: None

Defined at line 1199 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

void clear_modifiers ()

Defined at line 1207 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

const ::fuchsia::ui::input3::KeyMeaning & key_meaning ()

Meaning of the key.

Defined at line 1216 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

bool has_key_meaning ()

Defined at line 1220 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

::fuchsia::ui::input3::KeyMeaning * mutable_key_meaning ()

Meaning of the key.

Defined at line 1225 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

void clear_key_meaning ()

Defined at line 1233 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

const uint32_t & repeat_sequence ()

The sequence number of this `KeyEvent` in the sequence of autorepeated

keys.

Unset if this event has been generated in the immediate response to an

input from the keyboard driver. If the `KeyEvent` has been generated

through the autorepeat mechanism, this property is set and is

incremented by one for each successive generated key event.

Defined at line 1248 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

bool has_repeat_sequence ()

Defined at line 1252 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

uint32_t * mutable_repeat_sequence ()

The sequence number of this `KeyEvent` in the sequence of autorepeated

keys.

Unset if this event has been generated in the immediate response to an

input from the keyboard driver. If the `KeyEvent` has been generated

through the autorepeat mechanism, this property is set and is

incremented by one for each successive generated key event.

Defined at line 1263 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

void clear_repeat_sequence ()

Defined at line 1271 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

const ::fuchsia::ui::input3::LockState & lock_state ()

The lock state in effect at the time of the event.

For example, if CapsLock effect is turned on (pressing 'a' results in

the effect 'A'), the corresponding bit in the lock state is set.

NOTE: `LockState` is different from whether the CapsLock modifier key

is actuated or not. `LockState.CAPS_LOCK` can be active even if the

Caps Lock key is not currently actuated.

Defined at line 1287 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

bool has_lock_state ()

Defined at line 1291 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

::fuchsia::ui::input3::LockState * mutable_lock_state ()

The lock state in effect at the time of the event.

For example, if CapsLock effect is turned on (pressing 'a' results in

the effect 'A'), the corresponding bit in the lock state is set.

NOTE: `LockState` is different from whether the CapsLock modifier key

is actuated or not. `LockState.CAPS_LOCK` can be active even if the

Caps Lock key is not currently actuated.

Defined at line 1303 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

void clear_lock_state ()

Defined at line 1311 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

const uint32_t & device_id ()

Identifies the device originating this event.

Defined at line 1320 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

bool has_device_id ()

Defined at line 1324 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

uint32_t * mutable_device_id ()

Identifies the device originating this event.

Defined at line 1329 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

void clear_device_id ()

Defined at line 1337 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

KeyEvent & set_timestamp (int64_t _value)
KeyEvent & set_type (::fuchsia::ui::input3::KeyEventType _value)
KeyEvent & set_key (::fuchsia::input::Key _value)
KeyEvent & set_modifiers (::fuchsia::ui::input3::Modifiers _value)
KeyEvent & set_key_meaning (::fuchsia::ui::input3::KeyMeaning _value)
KeyEvent & set_repeat_sequence (uint32_t _value)
KeyEvent & set_lock_state (::fuchsia::ui::input3::LockState _value)
KeyEvent & set_device_id (uint32_t _value)
void KeyEvent ()
void KeyEvent (KeyEvent && other)
const int64_t & timestamp ()

Time in nanoseconds when the event was recorded, in the `CLOCK_MONOTONIC` time base.

The timestamp is **required** on every key event, and users can expect that it

will always be present.

Defined at line 1080 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

const ::fuchsia::ui::input3::KeyEventType & type ()

Type of event.

Defined at line 1108 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/hlcpp/fuchsia/ui/input3/cpp/fidl.h

void ~KeyEvent ()
KeyEvent & operator= (KeyEvent && other)
::std::unique_ptr<KeyEvent> New ()
void Encode (::fidl::Encoder * _encoder, size_t _offset, std::optional< ::fidl::HandleInformation> maybe_handle_info)
void Decode (::fidl::Decoder * _decoder, KeyEvent * _value, size_t _offset)
zx_status_t Clone (KeyEvent * _result)