]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Add #1170 to all the clueboard keymaps
authorskullY <skullydazed@gmail.com>
Wed, 22 Mar 2017 05:06:47 +0000 (22:06 -0700)
committerskullY <skullydazed@gmail.com>
Wed, 22 Mar 2017 05:06:47 +0000 (22:06 -0700)
keyboards/clueboard/keymaps/caps_fn/keymap.c
keyboards/clueboard/keymaps/colemak/keymap.c
keyboards/clueboard/keymaps/default/keymap.c
keyboards/clueboard/keymaps/mac_optimized/keymap.c
keyboards/clueboard/keymaps/mouse_keys/keymap.c
keyboards/clueboard/keymaps/shift_fn/keymap.c
keyboards/clueboard/keymaps/skully/keymap.c
keyboards/clueboard/keymaps/unix_optimized/keymap.c
keyboards/clueboard/keymaps/win_optimized/keymap.c

index 37f00e8d804c86b66c45a511fad8bd43ef65b47a..01779446cebceeaaf61b22fb96604abe9450d55d 100644 (file)
@@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
   static uint8_t mods_pressed;
+  static boot mod_flag;
 
   switch (id) {
     case 0:
@@ -61,6 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
         /* The key is being pressed.
          */
         if (mods_pressed) {
+          mod_flag = true;
           add_key(KC_GRV);
           send_keyboard_report();
         } else {
@@ -70,7 +72,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
       } else {
         /* The key is being released.
          */
-        if (mods_pressed) {
+        if (mod_flag) {
+          mod_flag = false;
           del_key(KC_GRV);
           send_keyboard_report();
         } else {
index 6b1fc7c9c658ee8e406f7ffef6522b0619ba011f..42c85ff9d83e0e3f3fb1032203c248701d76e4f8 100644 (file)
@@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
   static uint8_t mods_pressed;
+  static bool mod_flag;
 
   switch (id) {
     case 0:
@@ -61,6 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
         /* The key is being pressed.
          */
         if (mods_pressed) {
+          mod_flag = true;
           add_key(KC_GRV);
           send_keyboard_report();
         } else {
@@ -70,7 +72,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
       } else {
         /* The key is being released.
          */
-        if (mods_pressed) {
+        if (mod_flag) {
+          mod_flag = false;
           del_key(KC_GRV);
           send_keyboard_report();
         } else {
index 37f00e8d804c86b66c45a511fad8bd43ef65b47a..7fad9c1b21a0c32fc5afc5015434719379205744 100644 (file)
@@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
   static uint8_t mods_pressed;
+  static bool mod_flag;
 
   switch (id) {
     case 0:
@@ -61,6 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
         /* The key is being pressed.
          */
         if (mods_pressed) {
+          mod_flag = true;
           add_key(KC_GRV);
           send_keyboard_report();
         } else {
@@ -70,7 +72,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
       } else {
         /* The key is being released.
          */
-        if (mods_pressed) {
+        if (mod_flag) {
+          mod_flag = false;
           del_key(KC_GRV);
           send_keyboard_report();
         } else {
index 4a18e9a758aae317daf4bd019a3a9c79c22ed1f6..7ea02d27e83dbe782c3f68d8e300fbb91b9b60b2 100644 (file)
@@ -62,8 +62,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
         /* The key is being pressed.
          */
         if (mods_pressed) {
-          add_key(KC_GRV);
           mod_flag = true;
+          add_key(KC_GRV);
           send_keyboard_report();
         } else {
           add_key(KC_ESC);
@@ -73,8 +73,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
         /* The key is being released.
          */
         if (mod_flag) {
-          del_key(KC_GRV);
           mod_flag = false;
+          del_key(KC_GRV);
           send_keyboard_report();
         } else {
           del_key(KC_ESC);
index a9c5cebd0cfca60b32a3d9571fb72aa063ebe5f7..d3108d1e2b5487f1245c5825630fd71fb16eec60 100644 (file)
@@ -60,6 +60,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
   static uint8_t mods_pressed;
+  static bool mod_flag;
 
   switch (id) {
     case 0:
@@ -71,6 +72,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
         /* The key is being pressed.
          */
         if (mods_pressed) {
+          mod_flag = true;
           add_key(KC_GRV);
           send_keyboard_report();
         } else {
@@ -80,7 +82,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
       } else {
         /* The key is being released.
          */
-        if (mods_pressed) {
+        if (mod_flag) {
+          mod_flag = false;
           del_key(KC_GRV);
           send_keyboard_report();
         } else {
index f21b9b5895b9e73bdea672bf033c83db679c6fc7..c4fae03698299141c5e9d1774c01e5f9ddeec695 100644 (file)
@@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
   static uint8_t mods_pressed;
+  static bool mod_flag;
 
   switch (id) {
     case 0:
@@ -61,6 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
         /* The key is being pressed.
          */
         if (mods_pressed) {
+          mod_flag = true;
           add_key(KC_GRV);
           send_keyboard_report();
         } else {
@@ -70,7 +72,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
       } else {
         /* The key is being released.
          */
-        if (mods_pressed) {
+        if (mod_flag) {
+          mod_flag = false;
           del_key(KC_GRV);
           send_keyboard_report();
         } else {
index 295090352d7e100256c7dc20a18d2ff028e9df28..077d214facc3f8ae1b4bf84da71bc8043498627f 100644 (file)
@@ -47,6 +47,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
   static uint8_t mods_pressed;
+  static bool mod_flag;
 
   switch (id) {
     case 0:
@@ -58,6 +59,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
         /* The key is being pressed.
          */
         if (mods_pressed) {
+          mod_flag = true;
           add_key(KC_GRV);
           send_keyboard_report();
         } else {
@@ -67,7 +69,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
       } else {
         /* The key is being released.
          */
-        if (mods_pressed) {
+        if (mod_flag) {
+          mod_flag = false;
           del_key(KC_GRV);
           send_keyboard_report();
         } else {
index 9fbd772405f193ae00b8d95143710ba7be500605..7c1359954bae1cbee22d580b8e0bd55e637adf8a 100644 (file)
@@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
   static uint8_t mods_pressed;
+  static bool mod_flag;
 
   switch (id) {
     case 0:
@@ -61,6 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
         /* The key is being pressed.
          */
         if (mods_pressed) {
+          mod_flag = true;
           add_key(KC_GRV);
           send_keyboard_report();
         } else {
@@ -70,7 +72,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
       } else {
         /* The key is being released.
          */
-        if (mods_pressed) {
+        if (mod_flag) {
+          mod_flag = false;
           del_key(KC_GRV);
           send_keyboard_report();
         } else {
index a85f0824f18f9087de0006980ee7f1a3312a0f6e..c5553ff1fbd4be7df2674fff3dd90acc23f7ef0b 100644 (file)
@@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = {
 
 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
   static uint8_t mods_pressed;
+  static bool mod_flag;
 
   switch (id) {
     case 0:
@@ -61,6 +62,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
         /* The key is being pressed.
          */
         if (mods_pressed) {
+          mod_flag = true;
           add_key(KC_GRV);
           send_keyboard_report();
         } else {
@@ -70,7 +72,8 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
       } else {
         /* The key is being released.
          */
-        if (mods_pressed) {
+        if (mod_flag) {
+          mod_flag = false;
           del_key(KC_GRV);
           send_keyboard_report();
         } else {