diff options
author | tmk <nobody@nowhere> | 2013-03-20 00:56:54 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-03-20 01:45:04 +0900 |
commit | dbcac865b9faef2286ca2b0195ea08cf550d83ae (patch) | |
tree | ef97a69f18f1275966d318f69c70edf8dcb7ecaf | |
parent | ecb7550a91a7fb9a2e7e717f3c0d40d30fd92121 (diff) |
Add NO_ACTION_KEYMAP config option
-rw-r--r-- | common/action.c | 2 | ||||
-rw-r--r-- | common/layer_switch.c | 4 | ||||
-rw-r--r-- | common/layer_switch.h | 15 | ||||
-rw-r--r-- | keyboard/gh60/config.h | 1 |
4 files changed, 22 insertions, 0 deletions
diff --git a/common/action.c b/common/action.c index 51b11d1bc2..3d81318a9c 100644 --- a/common/action.c +++ b/common/action.c @@ -369,6 +369,7 @@ static void process_action(keyrecord_t *record) break; #endif +#ifndef NO_ACTION_KEYMAP case ACT_KEYMAP: switch (action.layer.code) { /* Keymap clear */ @@ -530,6 +531,7 @@ static void process_action(keyrecord_t *record) break; } break; +#endif #ifndef NO_ACTION_OVERLAY case ACT_OVERLAY: diff --git a/common/layer_switch.c b/common/layer_switch.c index 815d1e5f28..a5d426a899 100644 --- a/common/layer_switch.c +++ b/common/layer_switch.c @@ -24,6 +24,7 @@ void default_layer_set(uint8_t layer) } +#ifndef NO_ACTION_KEYMAP /* * Keymap Layer (0-15) */ @@ -95,6 +96,7 @@ void keymap_debug(void) { 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 +#ifndef NO_ACTION_KEYMAP /* keymap: top layer first */ for (int8_t i = 15; i >= 0; i--) { if (keymap_stat & (1<<i)) { @@ -198,6 +201,7 @@ action_t layer_switch_get_action(key_t key) } } } +#endif /* default layer */ action = action_for_key(default_layer, key); diff --git a/common/layer_switch.h b/common/layer_switch.h index 5de6cb01c3..eb4cf61ba3 100644 --- a/common/layer_switch.h +++ b/common/layer_switch.h @@ -38,6 +38,7 @@ void default_layer_set(uint8_t layer); /* * Keymap Layer */ +#ifndef NO_ACTION_KEYMAP extern uint16_t keymap_stat; /* return current active layer */ uint8_t keymap_get_layer(void); @@ -52,6 +53,20 @@ void keymap_or(uint16_t stat); void keymap_and(uint16_t stat); void keymap_xor(uint16_t stat); 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 /* diff --git a/keyboard/gh60/config.h b/keyboard/gh60/config.h index 2e2387aa29..7da5c6bbff 100644 --- a/keyboard/gh60/config.h +++ b/keyboard/gh60/config.h @@ -61,6 +61,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* disable print */ //#define NO_PRINT +#define NO_ACTION_KEYMAP #define NO_ACTION_OVERLAY #define NO_ACTION_TAPPING #define NO_ACTION_MACRO |