aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/clueboard/keymaps/mac_optimized/keymap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/keyboards/clueboard/keymaps/mac_optimized/keymap.c b/keyboards/clueboard/keymaps/mac_optimized/keymap.c
index 59f7ff243..4a18e9a75 100644
--- a/keyboards/clueboard/keymaps/mac_optimized/keymap.c
+++ b/keyboards/clueboard/keymaps/mac_optimized/keymap.c
@@ -50,6 +50,7 @@ const uint16_t PROGMEM fn_actions[] = {
50 50
51void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { 51void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
52 static uint8_t mods_pressed; 52 static uint8_t mods_pressed;
53 static bool mod_flag;
53 54
54 switch (id) { 55 switch (id) {
55 case 0: 56 case 0:
@@ -62,6 +63,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
62 */ 63 */
63 if (mods_pressed) { 64 if (mods_pressed) {
64 add_key(KC_GRV); 65 add_key(KC_GRV);
66 mod_flag = true;
65 send_keyboard_report(); 67 send_keyboard_report();
66 } else { 68 } else {
67 add_key(KC_ESC); 69 add_key(KC_ESC);
@@ -70,8 +72,9 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
70 } else { 72 } else {
71 /* The key is being released. 73 /* The key is being released.
72 */ 74 */
73 if (mods_pressed) { 75 if (mod_flag) {
74 del_key(KC_GRV); 76 del_key(KC_GRV);
77 mod_flag = false;
75 send_keyboard_report(); 78 send_keyboard_report();
76 } else { 79 } else {
77 del_key(KC_ESC); 80 del_key(KC_ESC);