From: tmk Date: Sat, 5 Dec 2015 05:21:40 +0000 (+0900) Subject: Merge pull request #271 from jeffgran/default-layer-toggle X-Git-Url: https://git.gir.st/tmk_keyboard.git/commitdiff_plain/2d673dfabc7dbafb60dd340b5b9bc45d91715315?hp=9c42227352646d00a8dc6e4eaa499bf5c1d97a9f Merge pull request #271 from jeffgran/default-layer-toggle add ACTION_DEFAULT_LAYER_TOGGLE to toggle a default layer on/off --- diff --git a/tmk_core/common/action_code.h b/tmk_core/common/action_code.h index 4fe9c1d5..da93f77b 100644 --- a/tmk_core/common/action_code.h +++ b/tmk_core/common/action_code.h @@ -255,6 +255,7 @@ enum layer_pram_tap_op { #define ACTION_LAYER_TAP(layer, key) (ACT_LAYER_TAP<<12 | (layer)<<8 | (key)) /* Default Layer */ #define ACTION_DEFAULT_LAYER_SET(layer) ACTION_DEFAULT_LAYER_BIT_SET((layer)/4, 1<<((layer)%4)) +#define ACTION_DEFAULT_LAYER_TOGGLE(layer) ACTION_DEFAULT_LAYER_BIT_XOR((layer)/4, 1<<((layer)%4)) /* Layer Operation */ #define ACTION_LAYER_CLEAR(on) ACTION_LAYER_BIT_AND(0, 0, (on)) #define ACTION_LAYER_MOMENTARY(layer) ACTION_LAYER_ON_OFF(layer)