123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #ifndef ACTION_H
- #define ACTION_H
- #include <stdint.h>
- #include <stdbool.h>
- #include "keyboard.h"
- #include "keycode.h"
- #include "action_code.h"
- #include "action_macro.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef struct {
- bool interrupted :1;
- bool reserved2 :1;
- bool reserved1 :1;
- bool reserved0 :1;
- uint8_t count :4;
- } tap_t;
- typedef struct {
- keyevent_t event;
- #ifndef NO_ACTION_TAPPING
- tap_t tap;
- #endif
- } keyrecord_t;
- void action_exec(keyevent_t event);
- action_t action_for_key(uint8_t layer, keypos_t key);
- const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt);
- void action_function(keyrecord_t *record, uint8_t id, uint8_t opt);
- bool process_record_quantum(keyrecord_t *record);
- #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
- extern bool disable_action_cache;
- #endif
- void process_record_nocache(keyrecord_t *record);
- void process_record(keyrecord_t *record);
- void process_action(keyrecord_t *record, action_t action);
- void register_code(uint8_t code);
- void unregister_code(uint8_t code);
- void register_mods(uint8_t mods);
- void unregister_mods(uint8_t mods);
- void clear_keyboard(void);
- void clear_keyboard_but_mods(void);
- void layer_switch(uint8_t new_layer);
- bool is_tap_key(keypos_t key);
- void debug_event(keyevent_t event);
- void debug_record(keyrecord_t record);
- void debug_action(action_t action);
- #ifdef __cplusplus
- }
- #endif
- #endif
|