| <link rel="stylesheet" href="../style.css" /> |
| |
| [TOC] |
| # fuchsia.ui.input3 |
| |
| <p><b>Added:7</b></p> |
| |
| ## **PROTOCOLS** |
| |
| ## KeyEventInjector {#KeyEventInjector} |
| *Defined in [fuchsia.ui.input3/keyboard.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.input3/keyboard.fidl;l=65)* |
| <p>Provides the ability to inject <code>KeyEvent</code>s into the keyboard subsystem.</p> |
| <h1>Roles</h1> |
| <p>This protocol will typically be:</p> |
| <ul> |
| <li>Implemented by platform components which process and deliver keyboard |
| events.</li> |
| <li>Consumed by components which originiate keyboard events. E.g. |
| an on-screen keyboard, or the Session Framework Input Pipeline.</li> |
| </ul> |
| <h1>Related protocols</h1> |
| <p>This protocol should be using in preference to legacy protocols which provide |
| similar functionality. Specifically, this means this protocol should be preferred |
| over</p> |
| <ul> |
| <li><code>fuchsia.ui.input.ImeService</code> which provides <code>InjectInput()</code>, <code>DispatchKey()</code>, |
| and <code>DispatchKey3()</code></li> |
| <li><code>fuchsia.ui.input.InputMethodEditor</code>, which provides <code>InjectInput()</code> and |
| <code>DispatchKey3()</code></li> |
| </ul> |
| <h1>Notes</h1> |
| <p>Products should take care to limit access to this protocol, as events injected |
| with this protocol are indistinguishable from those coming from physical devices.</p> |
| |
| ### Inject {#KeyEventInjector.Inject} |
| |
| <p>Inject an event into the keyboard subsystem.</p> |
| <h1>Returns</h1> |
| <ul> |
| <li><code>HANDLED</code> if the keyboard subsystem delivered the event to a consumer, |
| and the consumer reported that it <code>HANDLED</code> the event</li> |
| <li><code>NOT_HANDLED</code> if the keyboard subsystem did not deliever the event to |
| any consumers, or no consumer reported that it <code>HANDLED</code> the event.</li> |
| </ul> |
| |
| #### Request {#KeyEventInjector.Inject_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>key_event</code></td> |
| <td> |
| <code><a class='link' href='#KeyEvent'>KeyEvent</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#KeyEventInjector.Inject_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='#KeyEventStatus'>KeyEventStatus</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| ## Keyboard {#Keyboard} |
| *Defined in [fuchsia.ui.input3/keyboard.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.input3/keyboard.fidl;l=11)* |
| <p>Components may request this service from their namespace to be notified of |
| physical key events.</p> |
| |
| ### AddListener {#Keyboard.AddListener} |
| |
| <p>Add a key event listener for the specified View. |
| If multiple listeners are added, each will receive key events independently and |
| should respond with a <code>Status</code>.</p> |
| <p>The client calling <code>AddListener</code> should keep the connection to <code>Keyboard</code> alive |
| for as long as the events from <code>KeyboardListener</code> need to be received. Dropping the |
| connection to the <code>Keyboard</code> protocol will terminate <code>KeyboardListener</code> as well.</p> |
| |
| #### Request {#Keyboard.AddListener_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>view_ref</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.ui.views/'>fuchsia.ui.views</a>/<a class='link' href='../fuchsia.ui.views/#ViewRef'>ViewRef</a></code> |
| </td> |
| </tr> |
| <tr> |
| <td><code>listener</code></td> |
| <td> |
| <code><a class='link' href='#KeyboardListener'>KeyboardListener</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#Keyboard.AddListener_Response} |
| |
| <EMPTY> |
| |
| ## KeyboardListener {#KeyboardListener} |
| *Defined in [fuchsia.ui.input3/keyboard.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.input3/keyboard.fidl;l=26)* |
| <p>Client should implement this protocol to get notified of key events.</p> |
| |
| ### OnKeyEvent {#KeyboardListener.OnKeyEvent} |
| |
| <p>Called when a key event takes place, such as key press or release. |
| Protocol implementers must respond to acknowledge the event by returning Status |
| in a timely manner, i.e. not introducing significant delays to the |
| input pipeline (typically 10s of milliseconds). |
| Returning <code>NOT_HANDLED</code> means the event will propagate to another client or listener. |
| Clients that do not acknowledge their events will eventually be disconnected. |
| Notification is only dispatched when the View is focused (ViewRef is on FocusChain). |
| Parent Views receive the notification first, child Views last. |
| Returning <code>HANDLED</code> will stop event propagation to other clients and listeners.</p> |
| |
| #### Request {#KeyboardListener.OnKeyEvent_Request} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>event</code></td> |
| <td> |
| <code><a class='link' href='#KeyEvent'>KeyEvent</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| #### Response {#KeyboardListener.OnKeyEvent_Response} |
| |
| <table> |
| <tr><th>Name</th><th>Type</th></tr> |
| <tr> |
| <td><code>status</code></td> |
| <td> |
| <code><a class='link' href='#KeyEventStatus'>KeyEventStatus</a></code> |
| </td> |
| </tr> |
| </table> |
| |
| |
| |
| ## **ENUMS** |
| |
| ### KeyEventStatus [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#KeyEventStatus data-text="KeyEventStatus"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.ui.input3/keyboard.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.input3/keyboard.fidl;l=81)* |
| <p>Return type for clients key events listener.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="KeyEventStatus.HANDLED"> |
| <td><h3 id="KeyEventStatus.HANDLED" class="add-link hide-from-toc">HANDLED</h3></td> |
| <td><code>1</code></td> |
| <td><p>The key event was handled and its further propagation should be stopped.</p> |
| </td> |
| </tr> |
| <tr id="KeyEventStatus.NOT_HANDLED"> |
| <td><h3 id="KeyEventStatus.NOT_HANDLED" class="add-link hide-from-toc">NOT_HANDLED</h3></td> |
| <td><code>2</code></td> |
| <td><p>The key event wasn't handled and should be delivered to other clients or listeners.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### KeyEventType [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#KeyEventType data-text="KeyEventType"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.ui.input3/events.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.input3/events.fidl;l=10)* |
| <p>Type of the keyboard key input event.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="KeyEventType.PRESSED"> |
| <td><h3 id="KeyEventType.PRESSED" class="add-link hide-from-toc">PRESSED</h3></td> |
| <td><code>1</code></td> |
| <td><p>Key is pressed down.</p> |
| </td> |
| </tr> |
| <tr id="KeyEventType.RELEASED"> |
| <td><h3 id="KeyEventType.RELEASED" class="add-link hide-from-toc">RELEASED</h3></td> |
| <td><code>2</code></td> |
| <td><p>Key is released.</p> |
| </td> |
| </tr> |
| <tr id="KeyEventType.SYNC"> |
| <td><h3 id="KeyEventType.SYNC" class="add-link hide-from-toc">SYNC</h3></td> |
| <td><code>3</code></td> |
| <td><p>Key was pressed while the client wasn't able to receive it, e.g new device connected |
| with a key held down or before system was started. |
| Client should not handle this as a key press.</p> |
| </td> |
| </tr> |
| <tr id="KeyEventType.CANCEL"> |
| <td><h3 id="KeyEventType.CANCEL" class="add-link hide-from-toc">CANCEL</h3></td> |
| <td><code>4</code></td> |
| <td><p>Key was released while the client wasn't able to receive it, e.g device was disconnected |
| or focus lost. |
| Client should not handle this as a key release.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### NonPrintableKey [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#NonPrintableKey data-text="NonPrintableKey"} |
| Type: <code>uint32</code> |
| |
| *Defined in [fuchsia.ui.input3/events.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.input3/events.fidl;l=37)* |
| <p>NonPrintableKey represents the meaning of a non-symbolic key on a keyboard.</p> |
| <p>The 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</p> |
| <p>The space of the arrow keys is subdivided roughly to correspond to the |
| subsections of section 3 of that document. The choice for the section |
| values is arbitrary, so long as blocks of values are allocated at once, and |
| the keys with similar purpose are kept together.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="NonPrintableKey.ENTER"> |
| <td><h3 id="NonPrintableKey.ENTER" class="add-link hide-from-toc">ENTER</h3></td> |
| <td><code>49</code></td> |
| <td><p>The Enter or ↵ key, to activate current selection or accept current input. |
| This key value is also used for the Return (Macintosh numpad) key.</p> |
| </td> |
| </tr> |
| <tr id="NonPrintableKey.TAB"> |
| <td><h3 id="NonPrintableKey.TAB" class="add-link hide-from-toc">TAB</h3></td> |
| <td><code>50</code></td> |
| <td><p>The Horizontal Tabulation Tab key.</p> |
| </td> |
| </tr> |
| <tr id="NonPrintableKey.BACKSPACE"> |
| <td><h3 id="NonPrintableKey.BACKSPACE" class="add-link hide-from-toc">BACKSPACE</h3></td> |
| <td><code>65</code></td> |
| <td><p>Delete the character immediately preceding the cursor (i.e. the |
| character to the left for LTR languages).</p> |
| </td> |
| </tr> |
| <tr id="NonPrintableKey.DOWN"> |
| <td><h3 id="NonPrintableKey.DOWN" class="add-link hide-from-toc">DOWN</h3></td> |
| <td><code>97</code></td> |
| <td><p>The down arrow navigation key.</p> |
| </td> |
| </tr> |
| <tr id="NonPrintableKey.LEFT"> |
| <td><h3 id="NonPrintableKey.LEFT" class="add-link hide-from-toc">LEFT</h3></td> |
| <td><code>98</code></td> |
| <td><p>The left arrow navigation key.</p> |
| </td> |
| </tr> |
| <tr id="NonPrintableKey.RIGHT"> |
| <td><h3 id="NonPrintableKey.RIGHT" class="add-link hide-from-toc">RIGHT</h3></td> |
| <td><code>99</code></td> |
| <td><p>The right arrow navigation key.</p> |
| </td> |
| </tr> |
| <tr id="NonPrintableKey.UP"> |
| <td><h3 id="NonPrintableKey.UP" class="add-link hide-from-toc">UP</h3></td> |
| <td><code>100</code></td> |
| <td><p>The up arrow navigation key.</p> |
| </td> |
| </tr> |
| <tr id="NonPrintableKey.END"> |
| <td><h3 id="NonPrintableKey.END" class="add-link hide-from-toc">END</h3></td> |
| <td><code>101</code></td> |
| <td><p>The "End" key.</p> |
| </td> |
| </tr> |
| <tr id="NonPrintableKey.HOME"> |
| <td><h3 id="NonPrintableKey.HOME" class="add-link hide-from-toc">HOME</h3></td> |
| <td><code>102</code></td> |
| <td><p>The "Home" key.</p> |
| </td> |
| </tr> |
| <tr id="NonPrintableKey.PAGE_DOWN"> |
| <td><h3 id="NonPrintableKey.PAGE_DOWN" class="add-link hide-from-toc">PAGE_DOWN</h3></td> |
| <td><code>103</code></td> |
| <td><p>The "Page Down" key.</p> |
| </td> |
| </tr> |
| <tr id="NonPrintableKey.PAGE_UP"> |
| <td><h3 id="NonPrintableKey.PAGE_UP" class="add-link hide-from-toc">PAGE_UP</h3></td> |
| <td><code>104</code></td> |
| <td><p>The "Page Up" key.</p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **TABLES** |
| |
| ### KeyEvent {#KeyEvent data-text="KeyEvent"} |
| |
| |
| *Defined in [fuchsia.ui.input3/events.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.input3/events.fidl;l=101)* |
| <p>A Keyboard event generated to reflect key input. <code>timestamp</code> and <code>type</code> are required. |
| At least one of <code>key</code> and <code>key_meaning</code> must be set for a valid event.</p> |
| |
| <table> |
| <tr><th>Ordinal</th><th>Field</th><th>Type</th><th>Description</th></tr> |
| <tr id="KeyEvent.timestamp"> |
| <td><h3 id="KeyEvent.timestamp" class="add-link hide-from-toc">1</h3></td> |
| <td><code>timestamp</code></td> |
| <td> |
| <code><a class='link' href='../zx/'>zx</a>/<a class='link' href='../zx/#time'>time</a></code> |
| </td> |
| <td><p>Time in nanoseconds when the event was recorded, in the <code>CLOCK_MONOTONIC</code> time base. |
| The timestamp is <strong>required</strong> on every key event, and users can expect that it |
| will always be present.</p> |
| </td> |
| </tr> |
| <tr id="KeyEvent.type"> |
| <td><h3 id="KeyEvent.type" class="add-link hide-from-toc">2</h3></td> |
| <td><code>type</code></td> |
| <td> |
| <code><a class='link' href='#KeyEventType'>KeyEventType</a></code> |
| </td> |
| <td><p>Type of event.</p> |
| </td> |
| </tr> |
| <tr id="KeyEvent.key"> |
| <td><h3 id="KeyEvent.key" class="add-link hide-from-toc">3</h3></td> |
| <td><code>key</code></td> |
| <td> |
| <code><a class='link' href='../fuchsia.input/'>fuchsia.input</a>/<a class='link' href='../fuchsia.input/#Key'>Key</a></code> |
| </td> |
| <td><p>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.</p> |
| </td> |
| </tr> |
| <tr id="KeyEvent.modifiers"> |
| <td><h3 id="KeyEvent.modifiers" class="add-link hide-from-toc">4</h3></td> |
| <td><code>modifiers</code></td> |
| <td> |
| <code><a class='link' href='#Modifiers'>Modifiers</a></code> |
| </td> |
| <td><p>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:</p> |
| <ol> |
| <li>type: Pressed, key: CapsLock, modifiers: None</li> |
| <li>type: Pressed, key: A, modifiers: CapsLock</li> |
| <li>type: Released, key: CapsLock, modifiers: CapsLock</li> |
| <li>type: Released, key: A, modifiers: CapsLock</li> |
| </ol> |
| <p>CapsLock is on, user presses CapsLock, then A, then releases both.</p> |
| <ol> |
| <li>type: Pressed, key: CapsLock, modifiers: CapsLock</li> |
| <li>type: Pressed, key: A, modifiers: None</li> |
| <li>type: Released, key: CapsLock, modifiers: None</li> |
| <li>type: Released, key: A, modifiers: None</li> |
| </ol> |
| </td> |
| </tr> |
| <tr id="KeyEvent.key_meaning"> |
| <td><h3 id="KeyEvent.key_meaning" class="add-link hide-from-toc">5</h3></td> |
| <td><code>key_meaning</code></td> |
| <td> |
| <code><a class='link' href='#KeyMeaning'>KeyMeaning</a></code> |
| </td> |
| <td><p>Meaning of the key.</p> |
| </td> |
| </tr> |
| <tr id="KeyEvent.repeat_sequence"> |
| <td><h3 id="KeyEvent.repeat_sequence" class="add-link hide-from-toc">6</h3></td> |
| <td><code>repeat_sequence</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| <td><p>The sequence number of this <code>KeyEvent</code> in the sequence of autorepeated |
| keys.</p> |
| <p>Unset if this event has been generated in the immediate response to an |
| input from the keyboard driver. If the <code>KeyEvent</code> has been generated |
| through the autorepeat mechanism, this property is set and is |
| incremented by one for each successive generated key event.</p> |
| </td> |
| </tr> |
| <tr id="KeyEvent.lock_state"> |
| <td><h3 id="KeyEvent.lock_state" class="add-link hide-from-toc">7</h3></td> |
| <td><code>lock_state</code></td> |
| <td> |
| <code><a class='link' href='#LockState'>LockState</a></code> |
| </td> |
| <td><p>The lock state in effect at the time of the event.</p> |
| <p>For example, if CapsLock effect is turned on (pressing 'a' results in |
| the effect 'A'), the corresponding bit in the lock state is set.</p> |
| <p>NOTE: <code>LockState</code> is different from whether the CapsLock modifier key |
| is actuated or not. <code>LockState.CAPS_LOCK</code> can be active even if the |
| Caps Lock key is not currently actuated.</p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **UNIONS** |
| |
| ### KeyMeaning [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#KeyMeaning data-text="KeyMeaning"} |
| *Defined in [fuchsia.ui.input3/events.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.input3/events.fidl;l=88)* |
| <p>The meaning of the key press. This is typically the Unicode codepoint inserted |
| by this event, or an enum representing a key that corresponds to whitespace or |
| is otherwise unprintable.</p> |
| <table> |
| <tr><th>Ordinal</th><th>Variant</th><th>Type</th><th>Description</th></tr> |
| <tr id="KeyMeaning.codepoint"> |
| <td><h3 id="KeyMeaning.codepoint" class="add-link hide-from-toc">1</h3></td> |
| <td><code>codepoint</code></td> |
| <td> |
| <code>uint32</code> |
| </td> |
| <td><p>The Unicode codepoint representing character typed, if any.</p> |
| <ul> |
| <li>In Dart and Go, this corresponds to a <code>rune</code>.</li> |
| <li>In Rust, this corresponds to a <code>char</code>.</li> |
| <li>In C and C++, this corresponds to ICU's UChar32.</li> |
| </ul> |
| </td> |
| </tr> |
| <tr id="KeyMeaning.non_printable_key"> |
| <td><h3 id="KeyMeaning.non_printable_key" class="add-link hide-from-toc">2</h3></td> |
| <td><code>non_printable_key</code></td> |
| <td> |
| <code><a class='link' href='#NonPrintableKey'>NonPrintableKey</a></code> |
| </td> |
| <td><p>The meaning of the key for key events with no corresponding symbol.</p> |
| </td> |
| </tr> |
| </table> |
| |
| |
| ## **BITS** |
| |
| ### LockState [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#LockState} |
| Type: <code>uint64</code> |
| |
| *Defined in [fuchsia.ui.input3/modifiers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.input3/modifiers.fidl;l=70)* |
| <p>A bit field of lock states which are currently active.</p> |
| <p>Lock state reports whether the lock is active for the keys which have a lock |
| state (need to be pressed once to activate, and one more time to deactivate). |
| A set bit denotes active lock state.</p> |
| <p>For example, when Caps Lock is active, i.e. pressing 'a' produces the effect |
| of 'A' appearing on the screen, the <code>CAPS_LOCK</code> bit will be active.</p> |
| <p>The bit values in <code>LockState</code> are chosen to correspond to the values in |
| <code>Modifiers</code>, to the extent that this is doable in the long run.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="LockState.CAPS_LOCK"> |
| <td><h3 id="LockState.CAPS_LOCK" class="add-link hide-from-toc">CAPS_LOCK</h3></td> |
| <td>1</td> |
| <td><p>Applies when the <code>CAPS_LOCK</code> modifier is locked.</p> |
| <p>Users should bear in mind that the effect of <code>CAPS_LOCK</code> is limited to |
| alphabetic keys (not even <em>alphanumerics</em>) mainly.</p> |
| <p>For example, pressing <code>a</code> on a US QWERTY keyboard while <code>CAPS_LOCK</code> |
| state is locked results in the key meaning <code>A</code>, just as if the Shift modifier |
| was used. However, pressing <code>[</code> when <code>CAPS_LOCK</code> is locked gives <code>[</code>, |
| even though Shift+<code>[</code> gives <code>{</code>.</p> |
| <p>The position of alphabetic keys may vary depending on the keymap in |
| current use too.</p> |
| </td> |
| </tr> |
| <tr id="LockState.NUM_LOCK"> |
| <td><h3 id="LockState.NUM_LOCK" class="add-link hide-from-toc">NUM_LOCK</h3></td> |
| <td>2</td> |
| <td><p>Applies when the <code>NUM_LOCK</code> modifier is locked.</p> |
| </td> |
| </tr> |
| <tr id="LockState.SCROLL_LOCK"> |
| <td><h3 id="LockState.SCROLL_LOCK" class="add-link hide-from-toc">SCROLL_LOCK</h3></td> |
| <td>4</td> |
| <td><p>Applies when the <code>SCROLL_LOCK</code> modifier is locked.</p> |
| </td> |
| </tr> |
| <tr id="LockState.FUNCTION_LOCK"> |
| <td><h3 id="LockState.FUNCTION_LOCK" class="add-link hide-from-toc">FUNCTION_LOCK</h3></td> |
| <td>8</td> |
| <td><p>Applies when the <code>FUNCTION</code> modifier is locked.</p> |
| </td> |
| </tr> |
| <tr id="LockState.SYMBOL_LOCK"> |
| <td><h3 id="LockState.SYMBOL_LOCK" class="add-link hide-from-toc">SYMBOL_LOCK</h3></td> |
| <td>16</td> |
| <td><p>Applies when the <code>SYMBOL</code> modifier is locked.</p> |
| </td> |
| </tr> |
| </table> |
| |
| ### Modifiers [flexible](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Modifiers} |
| Type: <code>uint64</code> |
| |
| *Defined in [fuchsia.ui.input3/modifiers.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.ui.input3/modifiers.fidl;l=16)* |
| <p>Declares all the modifiers supported by Fuchsia's input subsystem.</p> |
| <p>Modifiers are special keys that modify the purpose or the function |
| of other keys when used in combination with them. In the Modifiers type, |
| a bit is set if the specific modifier key is actuated (held down), |
| irrespective of whether the modifier has an associated lock state or not.</p> |
| <p>Somewhat specially, and as a convenience for the users, the modifiers that |
| have "left" and "right" flavors have special bit values which can be used |
| if the distinction between sides does not matter.</p> |
| |
| <table> |
| <tr><th>Name</th><th>Value</th><th>Description</th></tr> |
| <tr id="Modifiers.CAPS_LOCK"> |
| <td><h3 id="Modifiers.CAPS_LOCK" class="add-link hide-from-toc">CAPS_LOCK</h3></td> |
| <td>1</td> |
| <td><p>Applies when the <code>CAPS_LOCK</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.NUM_LOCK"> |
| <td><h3 id="Modifiers.NUM_LOCK" class="add-link hide-from-toc">NUM_LOCK</h3></td> |
| <td>2</td> |
| <td><p>Applies when the <code>NUM_LOCK</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.SCROLL_LOCK"> |
| <td><h3 id="Modifiers.SCROLL_LOCK" class="add-link hide-from-toc">SCROLL_LOCK</h3></td> |
| <td>4</td> |
| <td><p>Applies when the <code>SCROLL_LOCK</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.FUNCTION"> |
| <td><h3 id="Modifiers.FUNCTION" class="add-link hide-from-toc">FUNCTION</h3></td> |
| <td>8</td> |
| <td><p>Applies when the <code>FUNCTION</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.SYMBOL"> |
| <td><h3 id="Modifiers.SYMBOL" class="add-link hide-from-toc">SYMBOL</h3></td> |
| <td>16</td> |
| <td><p>Applies when the <code>SYMBOL</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.LEFT_SHIFT"> |
| <td><h3 id="Modifiers.LEFT_SHIFT" class="add-link hide-from-toc">LEFT_SHIFT</h3></td> |
| <td>32</td> |
| <td><p>Applies when the left SHIFT modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.RIGHT_SHIFT"> |
| <td><h3 id="Modifiers.RIGHT_SHIFT" class="add-link hide-from-toc">RIGHT_SHIFT</h3></td> |
| <td>64</td> |
| <td><p>Applies when the right SHIFT modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.SHIFT"> |
| <td><h3 id="Modifiers.SHIFT" class="add-link hide-from-toc">SHIFT</h3></td> |
| <td>128</td> |
| <td><p>Applies when either <code>LEFT_SHIFT</code> or <code>RIGHT_SHIFT</code> modifier is actuated.</p> |
| <p>This bit mask a convenience to test for either <code>LEFT_SHIFT</code> |
| or <code>RIGHT_SHIFT</code>.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.LEFT_ALT"> |
| <td><h3 id="Modifiers.LEFT_ALT" class="add-link hide-from-toc">LEFT_ALT</h3></td> |
| <td>256</td> |
| <td><p>Applies when the left <code>ALT</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.RIGHT_ALT"> |
| <td><h3 id="Modifiers.RIGHT_ALT" class="add-link hide-from-toc">RIGHT_ALT</h3></td> |
| <td>512</td> |
| <td><p>Applies when the right <code>ALT</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.ALT"> |
| <td><h3 id="Modifiers.ALT" class="add-link hide-from-toc">ALT</h3></td> |
| <td>1024</td> |
| <td><p>Applies when either the left <code>ALT</code> or the right <code>ALT</code> modifier |
| is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.ALT_GRAPH"> |
| <td><h3 id="Modifiers.ALT_GRAPH" class="add-link hide-from-toc">ALT_GRAPH</h3></td> |
| <td>2048</td> |
| <td><p>Applies when the <code>ALT_GRAPH</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.LEFT_META"> |
| <td><h3 id="Modifiers.LEFT_META" class="add-link hide-from-toc">LEFT_META</h3></td> |
| <td>4096</td> |
| <td><p>Applies when the <code>LEFT_META</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.RIGHT_META"> |
| <td><h3 id="Modifiers.RIGHT_META" class="add-link hide-from-toc">RIGHT_META</h3></td> |
| <td>8192</td> |
| <td><p>Applies when the <code>RIGHT_META</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.META"> |
| <td><h3 id="Modifiers.META" class="add-link hide-from-toc">META</h3></td> |
| <td>16384</td> |
| <td><p>Applies when either <code>LEFT_META</code> or <code>RIGHT_META</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.LEFT_CTRL"> |
| <td><h3 id="Modifiers.LEFT_CTRL" class="add-link hide-from-toc">LEFT_CTRL</h3></td> |
| <td>32768</td> |
| <td><p>Applies when the <code>LEFT_CTRL</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.RIGHT_CTRL"> |
| <td><h3 id="Modifiers.RIGHT_CTRL" class="add-link hide-from-toc">RIGHT_CTRL</h3></td> |
| <td>65536</td> |
| <td><p>Applies when the <code>RIGHT_CTRL</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| <tr id="Modifiers.CTRL"> |
| <td><h3 id="Modifiers.CTRL" class="add-link hide-from-toc">CTRL</h3></td> |
| <td>131072</td> |
| <td><p>Applies when either <code>LEFT_CTRL</code> or <code>RIGHT_CTRL</code> modifier is actuated.</p> |
| </td> |
| </tr> |
| </table> |
| |
| |