aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/clueboard/keymaps
diff options
context:
space:
mode:
authorskullydazed <skullydazed@users.noreply.github.com>2017-03-21 21:54:24 -0700
committerGitHub <noreply@github.com>2017-03-21 21:54:24 -0700
commitdd967f2c0512a0007d214e219edf60dd990b778c (patch)
treee89c2de1635eb9fbe481cae29820f493c34abff4 /keyboards/clueboard/keymaps
parentc36a4496eb190c72c492000f38ab4e98a3681fe4 (diff)
parent3cba7a43d976be973a4fe32a058b98f092f2e26e (diff)
downloadfirmware-dd967f2c0512a0007d214e219edf60dd990b778c.tar.gz
firmware-dd967f2c0512a0007d214e219edf60dd990b778c.tar.bz2
firmware-dd967f2c0512a0007d214e219edf60dd990b778c.zip
Merge pull request #1170 from tengg/master
fixed a bug related to mod + Grave with combined ESC/Grave key
Diffstat (limited to 'keyboards/clueboard/keymaps')
-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[] = {
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:
@@ -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);