input.h 716 B

1234567891011121314151617181920
  1. #pragma once
  2. #include <furi-hal-resources.h>
  3. /* Input Types
  4. * Some of them are physical events and some logical
  5. */
  6. typedef enum {
  7. InputTypePress, /* Press event, emitted after debounce */
  8. InputTypeRelease, /* Release event, emitted after debounce */
  9. InputTypeShort, /* Short event, emitted after InputTypeRelease done withing INPUT_LONG_PRESS interval */
  10. InputTypeLong, /* Long event, emmited after INPUT_LONG_PRESS interval, asynchronouse to InputTypeRelease */
  11. InputTypeRepeat, /* Repeat event, emmited with INPUT_REPEATE_PRESS period after InputTypeLong event */
  12. } InputType;
  13. /* Input Event, dispatches with PubSub */
  14. typedef struct {
  15. InputKey key;
  16. InputType type;
  17. } InputEvent;