Macro count increased (#253)
This commit is contained in:
@ -39,13 +39,7 @@
|
|||||||
# define NUM_ENCODERS 0
|
# define NUM_ENCODERS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DYNAMIC_KEYMAP_LAYER_COUNT
|
_Static_assert(DYNAMIC_KEYMAP_MACRO_COUNT+MACRO00 < USER00, "DYNAMIC_KEYMAP_MACRO_COUNT too big.");
|
||||||
# define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef DYNAMIC_KEYMAP_MACRO_COUNT
|
|
||||||
# define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef TOTAL_EEPROM_BYTE_COUNT
|
#ifndef TOTAL_EEPROM_BYTE_COUNT
|
||||||
# error Unknown total EEPROM size. Cannot derive maximum for dynamic keymaps.
|
# error Unknown total EEPROM size. Cannot derive maximum for dynamic keymaps.
|
||||||
|
@ -26,6 +26,10 @@
|
|||||||
# define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
# define DYNAMIC_KEYMAP_LAYER_COUNT 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef DYNAMIC_KEYMAP_MACRO_COUNT
|
||||||
|
# define DYNAMIC_KEYMAP_MACRO_COUNT 16
|
||||||
|
#endif
|
||||||
|
|
||||||
uint8_t dynamic_keymap_get_layer_count(void);
|
uint8_t dynamic_keymap_get_layer_count(void);
|
||||||
void * dynamic_keymap_key_to_eeprom_address(uint8_t layer, uint8_t row, uint8_t column);
|
void * dynamic_keymap_key_to_eeprom_address(uint8_t layer, uint8_t row, uint8_t column);
|
||||||
uint16_t dynamic_keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t column);
|
uint16_t dynamic_keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t column);
|
||||||
|
@ -183,7 +183,7 @@ void via_set_layout_options(uint32_t value) {
|
|||||||
bool process_record_via(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_via(uint16_t keycode, keyrecord_t *record) {
|
||||||
// Handle macros
|
// Handle macros
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keycode >= MACRO00 && keycode <= MACRO15) {
|
if (keycode >= MACRO00 && keycode <= MACRO00 + DYNAMIC_KEYMAP_MACRO_COUNT - 1) {
|
||||||
uint8_t id = keycode - MACRO00;
|
uint8_t id = keycode - MACRO00;
|
||||||
dynamic_keymap_macro_send(id);
|
dynamic_keymap_macro_send(id);
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user