Skip to content

Commit

Permalink
Add qmk#1170 to all the clueboard keymaps
Browse files Browse the repository at this point in the history
  • Loading branch information
skullydazed committed Mar 22, 2017
1 parent dd967f2 commit 452949f
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 10 deletions.
5 changes: 4 additions & 1 deletion keyboards/clueboard/keymaps/caps_fn/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion keyboards/clueboard/keymaps/colemak/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion keyboards/clueboard/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions keyboards/clueboard/keymaps/mac_optimized/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
5 changes: 4 additions & 1 deletion keyboards/clueboard/keymaps/mouse_keys/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion keyboards/clueboard/keymaps/shift_fn/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion keyboards/clueboard/keymaps/skully/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion keyboards/clueboard/keymaps/unix_optimized/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion keyboards/clueboard/keymaps/win_optimized/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 {
Expand All @@ -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 {
Expand Down

0 comments on commit 452949f

Please sign in to comment.