From 743449472e58651ec8111e6f70811103fb0a28bd Mon Sep 17 00:00:00 2001 From: Joe Wasson Date: Mon, 17 Sep 2018 10:48:02 -0700 Subject: 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. --- tmk_core/common/action.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmk_core/common/action.h') 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 -- cgit v1.2.3-24-g4f1b From 26f4e7031a643ce2760ae7b6df3bd2c79710451a Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Mon, 1 Oct 2018 17:53:47 -0700 Subject: Add tap_code function (#3784) * Add tap_code * formatting * Doc clarification * Rename variable to make more consistent --- tmk_core/common/action.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmk_core/common/action.h') diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 0322c73ed..833febe9c 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -88,6 +88,7 @@ void process_record(keyrecord_t *record); void process_action(keyrecord_t *record, action_t action); void register_code(uint8_t code); void unregister_code(uint8_t code); +inline void tap_code(uint8_t code) { register_code(code); unregister_code(code); } void register_mods(uint8_t mods); void unregister_mods(uint8_t mods); //void set_mods(uint8_t mods); -- cgit v1.2.3-24-g4f1b From 02d44beb4410b806cb8c38e272941d212fee8a74 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 14 Dec 2018 09:01:58 -0800 Subject: Fix up tap_code functionality (#4609) * Add delay in Tap Code to avoid issues I think a few people have reporting issues with it working properly, and it may be a timing issue. The 'register_code' uses this sort of delay in some of the functions, and this is probably why. Adding the 100ms delay should hopefully fix any issues with it. * Make tap_code delay configurable * Update documentation * Bring tap_code16 inline with changes * Fix type for tap_code16 Bad copy-paste job * Just use the value check for the define * Clarify timing in docs Co-Authored-By: drashna * Wordsmithing Co-Authored-By: drashna --- tmk_core/common/action.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tmk_core/common/action.h') diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 833febe9c..5d797fd62 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -88,7 +88,7 @@ void process_record(keyrecord_t *record); void process_action(keyrecord_t *record, action_t action); void register_code(uint8_t code); void unregister_code(uint8_t code); -inline void tap_code(uint8_t code) { register_code(code); unregister_code(code); } +void tap_code(uint8_t code); void register_mods(uint8_t mods); void unregister_mods(uint8_t mods); //void set_mods(uint8_t mods); -- cgit v1.2.3-24-g4f1b From 93b004c943a4b13bd640fc83000e910b72cb4640 Mon Sep 17 00:00:00 2001 From: Konstantin Đorđević Date: Fri, 28 Dec 2018 20:07:56 +0100 Subject: Keep pressed keys on layer state change (fixes #2053, #2279) (#3905) * Keep pressed keys on layer state change * Add doc comment for clear_keyboard_but_mods_and_keys * Keep pressed keys only if PREVENT_STUCK_MODIFIERS is on * Check STRICT_LAYER_RELEASE instead of PREVENT_STUCK_MODIFIERS --- tmk_core/common/action.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tmk_core/common/action.h') diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index 5d797fd62..8e47e5339 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -94,6 +94,7 @@ void unregister_mods(uint8_t mods); //void set_mods(uint8_t mods); void clear_keyboard(void); void clear_keyboard_but_mods(void); +void clear_keyboard_but_mods_and_keys(void); void layer_switch(uint8_t new_layer); bool is_tap_key(keypos_t key); -- cgit v1.2.3-24-g4f1b