Selaa lähdekoodia

Remove unneeded tap delays #201

Jun Wako 10 vuotta sitten
vanhempi
commit
1f4a22ee81
2 muutettua tiedostoa jossa 13 lisäystä ja 8 poistoa
  1. 6 1
      tmk_core/common/action.c
  2. 7 7
      tmk_core/common/action_code.h

+ 6 - 1
tmk_core/common/action.c

@@ -518,7 +518,12 @@ bool is_tap_key(keypos_t key)
         case ACT_RMODS_TAP:
         case ACT_LAYER_TAP:
         case ACT_LAYER_TAP_EXT:
-            return true;
+            switch (action.layer_tap.code) {
+                case 0x00 ... 0xdf:
+                case OP_TAP_TOGGLE:
+                    return true;
+            }
+            return false;
         case ACT_MACRO:
         case ACT_FUNCTION:
             if (action.func.opt & FUNC_TAP) { return true; }

+ 7 - 7
tmk_core/common/action_code.h

@@ -70,13 +70,13 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  * 1001|oopp|BBBB BBBB   8-bit Bitwise Operation???
  *
  * ACT_LAYER_TAP(101x):
- * 101E|LLLL| keycode    On/Off with tap key
- * 101E|LLLL|1110 mods   On/Off with modifiers(0xE0-EF)
- * 101E|LLLL|1111 0000   Invert with tap toggle(0xF0)
- * 101E|LLLL|1111 0001   On/Off
- * 101E|LLLL|1111 0010   Off/On
- * 101E|LLLL|1111 0011   Set/Clear
- * 101E|LLLL|1111 xxxx   Reserved(0xF4-FF)
+ * 101E|LLLL| keycode    On/Off with tap key    (0x00-DF)[TAP]
+ * 101E|LLLL|1110 mods   On/Off with modifiers  (0xE0-EF)[NOT TAP]
+ * 101E|LLLL|1111 0000   Invert with tap toggle (0xF0)   [TAP]
+ * 101E|LLLL|1111 0001   On/Off                 (0xF1)   [NOT TAP]
+ * 101E|LLLL|1111 0010   Off/On                 (0xF2)   [NOT TAP]
+ * 101E|LLLL|1111 0011   Set/Clear              (0xF3)   [NOT TAP]
+ * 101E|LLLL|1111 xxxx   Reserved               (0xF4-FF)
  *   ELLLL: layer 0-31(E: extra bit for layer 16-31)
  *
  *