aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-02-20 16:53:55 +0900
committertmk <nobody@nowhere>2013-02-20 16:53:55 +0900
commit59e073e82b0a8bee13270bf328945ee6b8769c36 (patch)
tree2c681f8ba0659fdb9d31eea3863664c86f75bd85
parentc3d57b69e02fce40455c96f4a9ac6b68b89ce027 (diff)
downloadqmk_firmware-59e073e82b0a8bee13270bf328945ee6b8769c36.tar.gz
qmk_firmware-59e073e82b0a8bee13270bf328945ee6b8769c36.zip
Fix tap key bug: layer stuck
- Can't use Invert action for tap key, use On/Off insted.
-rw-r--r--common/action.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/common/action.c b/common/action.c
index 844a35b3e..294ce00fb 100644
--- a/common/action.c
+++ b/common/action.c
@@ -499,20 +499,20 @@ static void process_action(keyrecord_t *record)
499 /* Keymap Bit invert with tap key */ 499 /* Keymap Bit invert with tap key */
500 default: 500 default:
501 if (event.pressed) { 501 if (event.pressed) {
502 if (IS_TAPPING_KEY(event.key) && tap_count > 0) { 502 if (tap_count > 0) {
503 debug("KEYMAP_TAP_KEY: Tap: register_code\n"); 503 debug("KEYMAP_TAP_KEY: Tap: register_code\n");
504 register_code(action.layer.code); 504 register_code(action.layer.code);
505 } else { 505 } else {
506 debug("KEYMAP_TAP_KEY: No tap: invert on press\n"); 506 debug("KEYMAP_TAP_KEY: No tap: On on press\n");
507 keymap_invert(action.layer.val); 507 keymap_on(action.layer.val);
508 } 508 }
509 } else { 509 } else {
510 if (IS_TAPPING_KEY(event.key) && tap_count > 0) { 510 if (tap_count > 0) {
511 debug("KEYMAP_TAP_KEY: Tap: unregister_code\n"); 511 debug("KEYMAP_TAP_KEY: Tap: unregister_code\n");
512 unregister_code(action.layer.code); 512 unregister_code(action.layer.code);
513 } else { 513 } else {
514 debug("KEYMAP_TAP_KEY: No tap: invert on release\n"); 514 debug("KEYMAP_TAP_KEY: No tap: Off on release\n");
515 keymap_invert(action.layer.val); 515 keymap_off(action.layer.val);
516 } 516 }
517 } 517 }
518 break; 518 break;
@@ -649,20 +649,20 @@ static void process_action(keyrecord_t *record)
649 /* Overlay Bit invert with tap key */ 649 /* Overlay Bit invert with tap key */
650 default: 650 default:
651 if (event.pressed) { 651 if (event.pressed) {
652 if (IS_TAPPING_KEY(event.key) && tap_count > 0) { 652 if (tap_count > 0) {
653 debug("OVERLAY_TAP_KEY: Tap: register_code\n"); 653 debug("OVERLAY_TAP_KEY: Tap: register_code\n");
654 register_code(action.layer.code); 654 register_code(action.layer.code);
655 } else { 655 } else {
656 debug("OVERLAY_TAP_KEY: No tap: invert on press\n"); 656 debug("OVERLAY_TAP_KEY: No tap: On on press\n");
657 overlay_invert(action.layer.val); 657 overlay_on(action.layer.val);
658 } 658 }
659 } else { 659 } else {
660 if (IS_TAPPING_KEY(event.key) && tap_count > 0) { 660 if (tap_count > 0) {
661 debug("OVERLAY_TAP_KEY: Tap: unregister_code\n"); 661 debug("OVERLAY_TAP_KEY: Tap: unregister_code\n");
662 unregister_code(action.layer.code); 662 unregister_code(action.layer.code);
663 } else { 663 } else {
664 debug("OVERLAY_TAP_KEY: No tap: invert on release\n"); 664 debug("OVERLAY_TAP_KEY: No tap: Off on release\n");
665 overlay_invert(action.layer.val); 665 overlay_off(action.layer.val);
666 } 666 }
667 } 667 }
668 break; 668 break;