summaryrefslogtreecommitdiffstats
path: root/tmk_core
diff options
context:
space:
mode:
authorJoe Wasson <jwasson+github@gmail.com>2018-09-17 19:48:02 +0200
committerJack Humbert <jack.humb@gmail.com>2018-09-17 19:48:02 +0200
commit743449472e58651ec8111e6f70811103fb0a28bd (patch)
treebf8391fd9ba42ec08fa42fc867b20810cbe27d4f /tmk_core
parentb65e2143751fd7c1721a6690597f523137c7c484 (diff)
downloadqmk_firmware-743449472e58651ec8111e6f70811103fb0a28bd.tar.gz
qmk_firmware-743449472e58651ec8111e6f70811103fb0a28bd.tar.xz
Make `PREVENT_STUCK_MODIFIERS` the default (#3107)
* Remove chording as it is not documented, not used, and needs work. * Make Leader Key an optional feature. * Switch from `PREVENT_STUCK_MODIFIERS` to `STRICT_LAYER_RELEASE` * Remove `#define PREVENT_STUCK_MODIFIERS` from keymaps.
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/common/action.c2
-rw-r--r--tmk_core/common/action.h2
-rw-r--r--tmk_core/common/action_layer.c4
-rw-r--r--tmk_core/common/action_layer.h2
4 files changed, 5 insertions, 5 deletions
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index ae0864749..76d02bc9d 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -120,7 +120,7 @@ void process_hand_swap(keyevent_t *event) {
}
#endif
-#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
+#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE)
bool disable_action_cache = false;
void process_record_nocache(keyrecord_t *record)
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h
index acc55c7d3..0322c73ed 100644
--- a/tmk_core/common/action.h
+++ b/tmk_core/common/action.h
@@ -62,7 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt);
bool process_record_quantum(keyrecord_t *record);
/* Utilities for actions. */
-#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
+#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE)
extern bool disable_action_cache;
#endif
diff --git a/tmk_core/common/action_layer.c b/tmk_core/common/action_layer.c
index f3cd381ab..62375dfbf 100644
--- a/tmk_core/common/action_layer.c
+++ b/tmk_core/common/action_layer.c
@@ -219,7 +219,7 @@ void layer_debug(void)
}
#endif
-#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
+#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE)
uint8_t source_layers_cache[(MATRIX_ROWS * MATRIX_COLS + 7) / 8][MAX_LAYER_BITS] = {{0}};
void update_source_layers_cache(keypos_t key, uint8_t layer)
@@ -263,7 +263,7 @@ uint8_t read_source_layers_cache(keypos_t key)
*/
action_t store_or_get_action(bool pressed, keypos_t key)
{
-#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
+#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE)
if (disable_action_cache) {
return layer_switch_get_action(key);
}
diff --git a/tmk_core/common/action_layer.h b/tmk_core/common/action_layer.h
index 72a6bd8f6..7bf116be2 100644
--- a/tmk_core/common/action_layer.h
+++ b/tmk_core/common/action_layer.h
@@ -88,7 +88,7 @@ uint32_t layer_state_set_kb(uint32_t state);
#endif
/* pressed actions cache */
-#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
+#if !defined(NO_ACTION_LAYER) && !defined(STRICT_LAYER_RELEASE)
/* The number of bits needed to represent the layer number: log2(32). */
#define MAX_LAYER_BITS 5
void update_source_layers_cache(keypos_t key, uint8_t layer);