Project: /_project.yaml Book: /_book.yaml
Defined in fuchsia.ui.input2/keyboard.fidl
Components may request this service from their namespace to be notified of physical key events.
Set key event listener for the specified View.
Defined in fuchsia.ui.input2/keyboard.fidl
Client should implement this protocol to get notified of key events. Returning HANDLED will stop event propagation to other clients. This notification is triggered on the following conditions:
Defined in fuchsia.ui.input2/layout.fidl
Input method editors should implement this protocol to populate KeyEvent.symbol
field based on current key layout.
Get current key layout. Returns immediately on first call; subsequent calls return when the value changes.
Defined in fuchsia.ui.input2/keyboard.fidl
Components may request this service from their namespace to be notified of physical key events.
Set key event listener for the specified View.
Defined in fuchsia.ui.input2/keyboard.fidl
Client should implement this protocol to get notified of key events. Returning HANDLED will stop event propagation to other clients. This notification is triggered on the following conditions:
Defined in fuchsia.ui.input2/layout.fidl
Input method editors should implement this protocol to populate KeyEvent.symbol
field based on current key layout.
Get current key layout. Returns immediately on first call; subsequent calls return when the value changes.
Defined in fuchsia.ui.input2/layout.fidl
A mapping of a physical key to a key.
Defined in fuchsia.ui.input2/layout.fidl
A mapping of a key to the semantic meaning.
Defined in fuchsia.ui.input2/layout.fidl
A mapping of a physical key to a key.
Defined in fuchsia.ui.input2/layout.fidl
A mapping of a key to the semantic meaning.
Type: uint32
Defined in fuchsia.ui.input2/events.fidl
Phase of the keyboard key input.
Type: uint32
Defined in fuchsia.ui.input2/keyboard.fidl
Return type for clients key events listener.
Type: uint32
Defined in fuchsia.ui.input2/keys.fidl
A Fuchsia key represents a control that can be pressed or released such as a button on a keyboard.
Where applicable, the definition of each key is derived from one of the following sources albeit with a Fuchsia-specific numeric value:
The example key mappings included in this documentation assume a US English keyboard layout. Actual behavior varies by layout.
Type: uint32
Defined in fuchsia.ui.input2/semantic_keys.fidl
Semantic Key represents the meaning of a non-symbolic key on a keyboard.
Definition of each key is derived from W3C named values of a key attribute: https://www.w3.org/TR/uievents-key/#named-key-attribute-values
Type: uint32
Defined in fuchsia.ui.input2/events.fidl
Phase of the keyboard key input.
Type: uint32
Defined in fuchsia.ui.input2/keyboard.fidl
Return type for clients key events listener.
Type: uint32
Defined in fuchsia.ui.input2/keys.fidl
A Fuchsia key represents a control that can be pressed or released such as a button on a keyboard.
Where applicable, the definition of each key is derived from one of the following sources albeit with a Fuchsia-specific numeric value:
The example key mappings included in this documentation assume a US English keyboard layout. Actual behavior varies by layout.
Type: uint32
Defined in fuchsia.ui.input2/semantic_keys.fidl
Semantic Key represents the meaning of a non-symbolic key on a keyboard.
Definition of each key is derived from W3C named values of a key attribute: https://www.w3.org/TR/uievents-key/#named-key-attribute-values
Defined in fuchsia.ui.input2/events.fidl
Keyboard event is generated to reflect key input.
Use this value for the following purposes:
The input system derives this value from physical_key
by consulting the physical key map of the KeyboardLayout
that was active for the keyboard when when the key was pressed. Note that the same value will be reported when the key is released even if the keyboard layout changes in the interim between press and release.
Use this value for the following purposes:
The input system derives this value from the combination of physical_key
and modifiers
by consulting the key symbol map of KeyboardLayout
that was active for the keyboard when the key was pressed. Note that the same value will be reported when the key is released even if the keyboard layout or modifiers change in the interim between press and release.
Use this value for the following purposes:
The input system derives this value from the data reported by the keyboard itself without taking into account the keyboard’s current KeyboardLayout
or modifiers.
Defined in fuchsia.ui.input2/layout.fidl
Collection of key maps.
A physical key is first converted to key using key_map
. The key is then used to populate symbol
using symbol_map
. Maps in KeySymbolMap
should be searched for the key mapping in the order they are included. First key mapping found in an applicable map should be used. Only maps with matching modifiers should be used. See KeySymbolMap
for modifiers matching criteria and examples.
Defined in fuchsia.ui.input2/layout.fidl
Key map describes a conversion of a physical key to a key. Physical keys not included here are translated directly into keys.
Defined in fuchsia.ui.input2/layout.fidl
Key map describes a conversion of a key to symbol representation.
The map should be validated using key event modifier states. Map is applied if every modifier in the ‘modifiers’ list is active, and all other active modifiers are members of the ‘optional_modifiers’ list. If a modifier is enabled and not listed in neither modifiers
nor optional_modifiers
, the map should be ignored.
Example: Keyboard has NumLock and CapsLock enabled, and user presses Shift + Key.A
Map1: modifiers: “CapsLock” optional_modifiers: “NumLock” Map2: modifiers: “Shift”, optional_modifiers: “NumLock”, “CapsLock”, “ScrollLock” Map3: modifiers: None optional_modifiers: “Shift”, “CapsLock”
Map1 should be ignored, since “Shift” is pressed but is not included in modifiers
or optional_modifiers
.
Map2 should be searched, since required “Shift” is enabled, and all other enabled modifiers are included in optional_modifiers
.
Map3 should be ignored, since “NumLock” is enabled but not included in modifiers
or optional_modifiers
.
Defined in fuchsia.ui.input2/events.fidl
Keyboard event is generated to reflect key input.
Use this value for the following purposes:
The input system derives this value from physical_key
by consulting the physical key map of the KeyboardLayout
that was active for the keyboard when when the key was pressed. Note that the same value will be reported when the key is released even if the keyboard layout changes in the interim between press and release.
Use this value for the following purposes:
The input system derives this value from the combination of physical_key
and modifiers
by consulting the key symbol map of KeyboardLayout
that was active for the keyboard when the key was pressed. Note that the same value will be reported when the key is released even if the keyboard layout or modifiers change in the interim between press and release.
Use this value for the following purposes:
The input system derives this value from the data reported by the keyboard itself without taking into account the keyboard’s current KeyboardLayout
or modifiers.
Defined in fuchsia.ui.input2/layout.fidl
Collection of key maps.
A physical key is first converted to key using key_map
. The key is then used to populate symbol
using symbol_map
. Maps in KeySymbolMap
should be searched for the key mapping in the order they are included. First key mapping found in an applicable map should be used. Only maps with matching modifiers should be used. See KeySymbolMap
for modifiers matching criteria and examples.
Defined in fuchsia.ui.input2/layout.fidl
Key map describes a conversion of a physical key to a key. Physical keys not included here are translated directly into keys.
Defined in fuchsia.ui.input2/layout.fidl
Key map describes a conversion of a key to symbol representation.
The map should be validated using key event modifier states. Map is applied if every modifier in the ‘modifiers’ list is active, and all other active modifiers are members of the ‘optional_modifiers’ list. If a modifier is enabled and not listed in neither modifiers
nor optional_modifiers
, the map should be ignored.
Example: Keyboard has NumLock and CapsLock enabled, and user presses Shift + Key.A
Map1: modifiers: “CapsLock” optional_modifiers: “NumLock” Map2: modifiers: “Shift”, optional_modifiers: “NumLock”, “CapsLock”, “ScrollLock” Map3: modifiers: None optional_modifiers: “Shift”, “CapsLock”
Map1 should be ignored, since “Shift” is pressed but is not included in modifiers
or optional_modifiers
.
Map2 should be searched, since required “Shift” is enabled, and all other enabled modifiers are included in optional_modifiers
.
Map3 should be ignored, since “NumLock” is enabled but not included in modifiers
or optional_modifiers
.
Defined in fuchsia.ui.input2/events.fidl
Semantic for a physical key typed by the user. For letter or symbolic keys, is a string representation of the key typed. For non-symbolic keys, is a SemanticKeyAction value corresponding to the key pressed.
Examples: Key.A: “a” or “A” in US key layout, depending on CapsLock and Shift Key.SPACE: " " Key.TAB: SemanticKeyAction.TAB Key.GRAVE_ACCENT: “`” or “]” or “<”, depending on key layout
Defined in fuchsia.ui.input2/events.fidl
Semantic for a physical key typed by the user. For letter or symbolic keys, is a string representation of the key typed. For non-symbolic keys, is a SemanticKeyAction value corresponding to the key pressed.
Examples: Key.A: “a” or “A” in US key layout, depending on CapsLock and Shift Key.SPACE: " " Key.TAB: SemanticKeyAction.TAB Key.GRAVE_ACCENT: “`” or “]” or “<”, depending on key layout
Type: uint32
Type: uint32