Add NO_ACTION_KEYMAP config option
This commit is contained in:
parent
ecb7550a91
commit
dbcac865b9
@ -369,6 +369,7 @@ static void process_action(keyrecord_t *record)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef NO_ACTION_KEYMAP
|
||||||
case ACT_KEYMAP:
|
case ACT_KEYMAP:
|
||||||
switch (action.layer.code) {
|
switch (action.layer.code) {
|
||||||
/* Keymap clear */
|
/* Keymap clear */
|
||||||
@ -530,6 +531,7 @@ static void process_action(keyrecord_t *record)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef NO_ACTION_OVERLAY
|
#ifndef NO_ACTION_OVERLAY
|
||||||
case ACT_OVERLAY:
|
case ACT_OVERLAY:
|
||||||
|
@ -24,6 +24,7 @@ void default_layer_set(uint8_t layer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NO_ACTION_KEYMAP
|
||||||
/*
|
/*
|
||||||
* Keymap Layer (0-15)
|
* Keymap Layer (0-15)
|
||||||
*/
|
*/
|
||||||
@ -95,6 +96,7 @@ void keymap_debug(void)
|
|||||||
{
|
{
|
||||||
debug_hex16(keymap_stat); debug("("); debug_dec(keymap_get_layer()); debug(")");
|
debug_hex16(keymap_stat); debug("("); debug_dec(keymap_get_layer()); debug(")");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -189,6 +191,7 @@ action_t layer_switch_get_action(key_t key)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef NO_ACTION_KEYMAP
|
||||||
/* keymap: top layer first */
|
/* keymap: top layer first */
|
||||||
for (int8_t i = 15; i >= 0; i--) {
|
for (int8_t i = 15; i >= 0; i--) {
|
||||||
if (keymap_stat & (1<<i)) {
|
if (keymap_stat & (1<<i)) {
|
||||||
@ -198,6 +201,7 @@ action_t layer_switch_get_action(key_t key)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* default layer */
|
/* default layer */
|
||||||
action = action_for_key(default_layer, key);
|
action = action_for_key(default_layer, key);
|
||||||
|
@ -38,6 +38,7 @@ void default_layer_set(uint8_t layer);
|
|||||||
/*
|
/*
|
||||||
* Keymap Layer
|
* Keymap Layer
|
||||||
*/
|
*/
|
||||||
|
#ifndef NO_ACTION_KEYMAP
|
||||||
extern uint16_t keymap_stat;
|
extern uint16_t keymap_stat;
|
||||||
/* return current active layer */
|
/* return current active layer */
|
||||||
uint8_t keymap_get_layer(void);
|
uint8_t keymap_get_layer(void);
|
||||||
@ -52,6 +53,20 @@ void keymap_or(uint16_t stat);
|
|||||||
void keymap_and(uint16_t stat);
|
void keymap_and(uint16_t stat);
|
||||||
void keymap_xor(uint16_t stat);
|
void keymap_xor(uint16_t stat);
|
||||||
void keymap_debug(void);
|
void keymap_debug(void);
|
||||||
|
#else
|
||||||
|
#define keymap_stat 0
|
||||||
|
#define keymap_get_layer()
|
||||||
|
#define keymap_clear()
|
||||||
|
#define keymap_set(stat)
|
||||||
|
#define keymap_move(layer)
|
||||||
|
#define keymap_on(layer)
|
||||||
|
#define keymap_off(layer)
|
||||||
|
#define keymap_invert(layer)
|
||||||
|
#define keymap_or(stat)
|
||||||
|
#define keymap_and(stat)
|
||||||
|
#define keymap_xor(stat)
|
||||||
|
#define keymap_debug()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -61,6 +61,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
/* disable print */
|
/* disable print */
|
||||||
//#define NO_PRINT
|
//#define NO_PRINT
|
||||||
|
|
||||||
|
#define NO_ACTION_KEYMAP
|
||||||
#define NO_ACTION_OVERLAY
|
#define NO_ACTION_OVERLAY
|
||||||
#define NO_ACTION_TAPPING
|
#define NO_ACTION_TAPPING
|
||||||
#define NO_ACTION_MACRO
|
#define NO_ACTION_MACRO
|
||||||
|
Loading…
Reference in New Issue
Block a user