]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - common/action.c
Merge branch 'modstaptoggle' of git://github.com/simonmelhart/tmk_keyboard into simon...
[max/tmk_keyboard.git] / common / action.c
index f7ae85b94182c06b251ab82230a36ad37782ced5..e6938f5a237ad6eec433c08a845b907f8176b8df 100644 (file)
@@ -128,6 +128,17 @@ void process_action(keyrecord_t *record)
                         }
                         break;
     #endif
+                    case MODS_TAP_TOGGLE:
+                        if (event.pressed) {
+                            if (tap_count <= TAPPING_TOGGLE) {
+                                register_mods(mods);
+                            }
+                        } else {
+                            if (tap_count < TAPPING_TOGGLE) {
+                                unregister_mods(mods);
+                            }
+                        }
+                        break;
                     default:
                         if (event.pressed) {
                             if (tap_count > 0) {
@@ -485,12 +496,6 @@ void clear_keyboard_but_mods(void)
 #endif
 }
 
-bool sending_anykey(void)
-{
-    return (has_anykey() || host_mouse_in_use() ||
-            host_last_sysytem_report() || host_last_consumer_report());
-}
-
 bool is_tap_key(key_t key)
 {
     action_t action = layer_switch_get_action(key);