zephyr,input-double-tap
Description
Input double tap pseudo-device
Listens for key events as an input and produces key events as output
corresponding to double taps, and optionally to single taps.
Can optionally be associated to a specific device to listen for events
only from that device.
A single tap is reported once the double tap delay expires without a second
press, and only if the key has been released in the meantime, so that holding
a key down does not generate a single tap event.
Examples
#include <zephyr/dt-bindings/input/input-event-codes.h>
double_tap {
input = <&buttons>;
compatible = "zephyr,input-double-tap";
input-codes = <INPUT_KEY_0>, <INPUT_KEY_1>;
single-tap-codes = <INPUT_KEY_X>, <INPUT_KEY_Y>;
double-tap-codes = <INPUT_KEY_A>, <INPUT_KEY_B>;
double-tap-delay-ms = <300>;
};
Properties
Properties not inherited from the base binding file.
Name |
Type |
Details |
|---|---|---|
|
|
Input device phandle, if not specified listen for input from all devices.
|
|
|
Array of input event key codes (INPUT_KEY_* or INPUT_BTN_*).
This property is required. |
|
|
Array of key codes to be generated for single taps (INPUT_KEY_* or INPUT_BTN_*).
|
|
|
Array of key codes to be generated for double taps (INPUT_KEY_* or INPUT_BTN_*).
This property is required. |
|
|
Maximum time delay between taps to register a double tap, in milliseconds.
This property is required. |
Deprecated properties not inherited from the base binding file.
(None)
Properties inherited from the base binding file, which defines common properties that may be set on many nodes. Not all of these may apply to the “zephyr,input-double-tap” compatible.
(None)