Flipper Developer Docs
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
11
extern
"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
21
typedef
enum
{
22
InputTypePress
,
23
InputTypeRelease
,
24
InputTypeShort
,
25
InputTypeLong
,
26
InputTypeRepeat
,
27
InputTypeMAX
,
28
}
InputType
;
29
31
typedef
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;
41
}
InputEvent
;
42
47
const
char
*
input_get_key_name
(InputKey key);
48
53
const
char
*
input_get_type_name
(
InputType
type);
54
55
#ifdef __cplusplus
56
}
57
#endif
InputType
InputType
Input Types Some of them are physical events and some logical.
Definition
input.h:21
InputTypeShort
@ InputTypeShort
Short event, emitted after InputTypeRelease done within INPUT_LONG_PRESS interval.
Definition
input.h:24
InputTypeRepeat
@ InputTypeRepeat
Repeat event, emitted with INPUT_LONG_PRESS_COUNTS period after InputTypeLong event.
Definition
input.h:26
InputTypeRelease
@ InputTypeRelease
Release event, emitted after debounce.
Definition
input.h:23
InputTypeMAX
@ InputTypeMAX
Special value for exceptional.
Definition
input.h:27
InputTypePress
@ InputTypePress
Press event, emitted after debounce.
Definition
input.h:22
InputTypeLong
@ InputTypeLong
Long event, emitted after INPUT_LONG_PRESS_COUNTS interval, asynchronous to InputTypeRelease
Definition
input.h:25
input_get_type_name
const char * input_get_type_name(InputType type)
Get human readable input type name.
Definition
input.c:65
input_get_key_name
const char * input_get_key_name(InputKey key)
Get human readable input key name.
Definition
input.c:56
InputEvent
Input Event, dispatches with FuriPubSub.
Definition
input.h:31
applications
services
input
input.h
Generated by
1.12.0