summaryrefslogtreecommitdiffstats
path: root/keyboards/clueboard/keymaps/mac_optimized/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/clueboard/keymaps/mac_optimized/keymap.c')
-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 59f7ff2436..bb1a5d3cb5 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[] = {
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
static uint8_t mods_pressed;
+ static bool mods_flag;
switch (id) {
case 0:
@@ -62,6 +63,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
*/
if (mods_pressed) {
add_key(KC_GRV);
+ mod_flag = true;
send_keyboard_report();
} else {
add_key(KC_ESC);
@@ -70,8 +72,9 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
} else {
/* The key is being released.
*/
- if (mods_pressed) {
+ if (mod_flag) {
del_key(KC_GRV);
+ mod_flag = false;
send_keyboard_report();
} else {
del_key(KC_ESC);