Flipper Zero Firmware
Loading...
Searching...
No Matches
input.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <furi_hal_resources.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#define RECORD_INPUT_EVENTS "input_events"
15#define INPUT_SEQUENCE_SOURCE_HARDWARE (0u)
16#define INPUT_SEQUENCE_SOURCE_SOFTWARE (1u)
17
29
31typedef struct {
32 union {
33 uint32_t sequence;
34 struct {
35 uint8_t sequence_source : 2;
36 uint32_t sequence_counter : 30;
37 };
38 };
39 InputKey key;
40 InputType type;
42
47const char* input_get_key_name(InputKey key);
48
53const char* input_get_type_name(InputType type);
54
55#ifdef __cplusplus
56}
57#endif
InputType
Input Types Some of them are physical events and some logical.
Definition input.h:21
@ InputTypeShort
Short event, emitted after InputTypeRelease done within INPUT_LONG_PRESS interval.
Definition input.h:24
@ InputTypeRepeat
Repeat event, emitted with INPUT_LONG_PRESS_COUNTS period after InputTypeLong event.
Definition input.h:26
@ InputTypeRelease
Release event, emitted after debounce.
Definition input.h:23
@ InputTypeMAX
Special value for exceptional.
Definition input.h:27
@ InputTypePress
Press event, emitted after debounce.
Definition input.h:22
@ InputTypeLong
Long event, emitted after INPUT_LONG_PRESS_COUNTS interval, asynchronous to InputTypeRelease
Definition input.h:25
const char * input_get_type_name(InputType type)
Get human readable input type name.
Definition input.c:65
const char * input_get_key_name(InputKey key)
Get human readable input key name.
Definition input.c:56
Input Event, dispatches with FuriPubSub.
Definition input.h:31