]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Fix tap key bug: layer stuck
authortmk <nobody@nowhere>
Wed, 20 Feb 2013 07:53:55 +0000 (16:53 +0900)
committertmk <nobody@nowhere>
Wed, 20 Feb 2013 07:53:55 +0000 (16:53 +0900)
- Can't use Invert action for tap key, use On/Off insted.

common/action.c

index 844a35b3e14a25852f6391d032fb9f52b954eecc..294ce00fb1914ef5873ccd382206da1a1766373b 100644 (file)
@@ -499,20 +499,20 @@ static void process_action(keyrecord_t *record)
                 /* Keymap Bit invert with tap key */
                 default:
                     if (event.pressed) {
-                        if (IS_TAPPING_KEY(event.key) && tap_count > 0) {
+                        if (tap_count > 0) {
                             debug("KEYMAP_TAP_KEY: Tap: register_code\n");
                             register_code(action.layer.code);
                         } else {
-                            debug("KEYMAP_TAP_KEY: No tap: invert on press\n");
-                            keymap_invert(action.layer.val);
+                            debug("KEYMAP_TAP_KEY: No tap: On on press\n");
+                            keymap_on(action.layer.val);
                         }
                     } else {
-                        if (IS_TAPPING_KEY(event.key) && tap_count > 0) {
+                        if (tap_count > 0) {
                             debug("KEYMAP_TAP_KEY: Tap: unregister_code\n");
                             unregister_code(action.layer.code);
                         } else {
-                            debug("KEYMAP_TAP_KEY: No tap: invert on release\n");
-                            keymap_invert(action.layer.val);
+                            debug("KEYMAP_TAP_KEY: No tap: Off on release\n");
+                            keymap_off(action.layer.val);
                         }
                     }
                     break;
@@ -649,20 +649,20 @@ static void process_action(keyrecord_t *record)
                 /* Overlay Bit invert with tap key */
                 default:
                     if (event.pressed) {
-                        if (IS_TAPPING_KEY(event.key) && tap_count > 0) {
+                        if (tap_count > 0) {
                             debug("OVERLAY_TAP_KEY: Tap: register_code\n");
                             register_code(action.layer.code);
                         } else {
-                            debug("OVERLAY_TAP_KEY: No tap: invert on press\n");
-                            overlay_invert(action.layer.val);
+                            debug("OVERLAY_TAP_KEY: No tap: On on press\n");
+                            overlay_on(action.layer.val);
                         }
                     } else {
-                        if (IS_TAPPING_KEY(event.key) && tap_count > 0) {
+                        if (tap_count > 0) {
                             debug("OVERLAY_TAP_KEY: Tap: unregister_code\n");
                             unregister_code(action.layer.code);
                         } else {
-                            debug("OVERLAY_TAP_KEY: No tap: invert on release\n");
-                            overlay_invert(action.layer.val);
+                            debug("OVERLAY_TAP_KEY: No tap: Off on release\n");
+                            overlay_off(action.layer.val);
                         }
                     }
                     break;