class KeyEvent
Defined at line 109 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/cpp/fidl/fuchsia.ui.input3/cpp/wire_types.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 Methods
bool IsEmpty ()
Returns whether no field is set.
bool HasUnknownData ()
Returns whether the table references unknown fields.
::fidl::WireTableBuilder< ::fuchsia_ui_input3::wire::KeyEvent> Builder (::fidl::AnyArena & arena)
Return a builder that by defaults allocates of an arena.
::fidl::WireTableExternalBuilder< ::fuchsia_ui_input3::wire::KeyEvent> ExternalBuilder (::fidl::ObjectView< ::fidl::WireTableFrame< ::fuchsia_ui_input3::wire::KeyEvent>> frame)
Return a builder that relies on explicitly allocating |fidl::ObjectView|s.
void Allocate (::fidl::AnyArena & allocator)
void Init (::fidl::ObjectView< ::fidl::WireTableFrame< ::fuchsia_ui_input3::wire::KeyEvent>> && frame_ptr)
void KeyEvent ()
Defined at line 111 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/cpp/fidl/fuchsia.ui.input3/cpp/wire_types.h
void KeyEvent (const KeyEvent & other)
Defined at line 112 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/cpp/fidl/fuchsia.ui.input3/cpp/wire_types.h
void KeyEvent (KeyEvent && other)
Defined at line 114 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/cpp/fidl/fuchsia.ui.input3/cpp/wire_types.h
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.
bool has_timestamp ()
::fuchsia_ui_input3::wire::KeyEventType & type ()
Type of event.
bool has_type ()
::fuchsia_input::wire::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.
bool has_key ()
::fuchsia_ui_input3::wire::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
bool has_modifiers ()
::fuchsia_ui_input3::wire::KeyMeaning & key_meaning ()
Meaning of the key.
bool has_key_meaning ()
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.
bool has_repeat_sequence ()
::fuchsia_ui_input3::wire::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.
bool has_lock_state ()
uint32_t & device_id ()
Identifies the device originating this event.
bool has_device_id ()
KeyEvent & set_timestamp (::fidl::ObjectView<int64_t> elem)
KeyEvent & set_timestamp (std::nullptr_t )
KeyEvent & clear_timestamp ()
KeyEvent & operator= (const KeyEvent & other)
Defined at line 113 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/cpp/fidl/fuchsia.ui.input3/cpp/wire_types.h
KeyEvent & set_type (::fuchsia_ui_input3::wire::KeyEventType elem)
KeyEvent & clear_type ()
KeyEvent & set_key (::fuchsia_input::wire::Key elem)
KeyEvent & clear_key ()
KeyEvent & set_modifiers (::fidl::ObjectView< ::fuchsia_ui_input3::wire::Modifiers> elem)
KeyEvent & set_modifiers (std::nullptr_t )
KeyEvent & clear_modifiers ()
KeyEvent & set_key_meaning (::fidl::ObjectView< ::fuchsia_ui_input3::wire::KeyMeaning> elem)
KeyEvent & set_key_meaning (std::nullptr_t )
KeyEvent & clear_key_meaning ()
KeyEvent & set_repeat_sequence (uint32_t elem)
KeyEvent & clear_repeat_sequence ()
KeyEvent & set_lock_state (::fidl::ObjectView< ::fuchsia_ui_input3::wire::LockState> elem)
KeyEvent & set_lock_state (std::nullptr_t )
KeyEvent & clear_lock_state ()
KeyEvent & set_device_id (uint32_t elem)
KeyEvent & clear_device_id ()
void KeyEvent (::fidl::AnyArena & allocator)
void KeyEvent (::fidl::ObjectView< ::fidl::WireTableFrame< ::fuchsia_ui_input3::wire::KeyEvent>> && frame)
This constructor allows a user controlled allocation (not using a Arena).
It should only be used when performance is key.
As soon as the frame is given to the table, it must not be used directly or for another table.
KeyEvent & operator= (KeyEvent && other)
Defined at line 115 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/cpp/fidl/fuchsia.ui.input3/cpp/wire_types.h
void ~KeyEvent ()
Defined at line 117 of file fidling/gen/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3/cpp/fidl/fuchsia.ui.input3/cpp/wire_types.h
Friends
class WireTableBaseBuilder
class WireTableBaseBuilder