forked from mirrors/qmk_userspace
Implemented basic key combination feature
This commit is contained in:
parent
d0c667c790
commit
eac8fa7999
5 changed files with 103 additions and 0 deletions
25
quantum/process_keycode/process_combo.h
Normal file
25
quantum/process_keycode/process_combo.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
#ifndef PROCESS_COMBO_H
|
||||
#define PROCESS_COMBO_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include "progmem.h"
|
||||
#include "quantum.h"
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const uint16_t *keys;
|
||||
uint16_t action;
|
||||
uint32_t state;
|
||||
} combo_t;
|
||||
|
||||
|
||||
#define COMBO_END 0
|
||||
#define NUM_ELEMS(a) (sizeof(a)/sizeof 0[a])
|
||||
|
||||
|
||||
extern combo_t key_combos[1];
|
||||
|
||||
bool process_combo(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue