forked from qmk/qmk_userspace
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove some unnecessary variables and spacing
- Loading branch information
Showing
6 changed files
with
88 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,71 @@ | ||
#pragma once | ||
|
||
#if ! defined(IS_MOUSE) | ||
//===========================// | ||
// COMMON COMBOS // | ||
//===========================// | ||
const uint16_t PROGMEM pl_combo_qa[] = {KC_Q , KC_A, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_bsz[] = {KC_NUBS, KC_Z, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_zx[] = {KC_Z , KC_X, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_xc[] = {KC_X , KC_C, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_cv[] = {KC_C , KC_V, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_xcv[] = {KC_X , KC_C , KC_V, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_tabq[] = {KC_TAB , KC_Q , COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_tabw[] = {KC_TAB , KC_W , COMBO_END}; | ||
//===========================// | ||
// COMMON COMBOS // | ||
//===========================// | ||
const uint16_t PROGMEM pl_combo_qa[] = {KC_Q , KC_A, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_bsz[] = {KC_NUBS, KC_Z, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_zx[] = {KC_Z , KC_X, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_xc[] = {KC_X , KC_C, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_cv[] = {KC_C , KC_V, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_xcv[] = {KC_X , KC_C , KC_V, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_tabq[] = {KC_TAB , KC_Q , COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_tabw[] = {KC_TAB , KC_W , COMBO_END}; | ||
|
||
//===========================// | ||
// COMBOS FOR DYNAMIC MACROS // | ||
//===========================// | ||
//===========================// | ||
// COMBOS FOR DYNAMIC MACROS // | ||
//===========================// | ||
# if defined(DYNAMIC_MACRO_ENABLE) | ||
const uint16_t PROGMEM pl_combo_12[] = {KC_1 , KC_2, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_13[] = {KC_1 , KC_3, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_qw[] = {KC_Q , KC_W, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_qe[] = {KC_Q , KC_E, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_3e[] = {KC_3 , KC_E, COMBO_END}; | ||
# endif //DYNAMIC_MACRO_ENABLE | ||
|
||
combo_t key_combos[] = { | ||
COMBO(pl_combo_qa, C(KC_A)), | ||
COMBO(pl_combo_bsz, C(KC_Z)), | ||
COMBO(pl_combo_zx, C(KC_X)), | ||
COMBO(pl_combo_xc, C(KC_C)), | ||
COMBO(pl_combo_cv, C(KC_V)), | ||
COMBO(pl_combo_xcv, C(S(KC_V))), | ||
COMBO(pl_combo_tabq, PL_ALTSTAB), | ||
COMBO(pl_combo_tabw, PL_ALTTAB), | ||
# if defined(DYNAMIC_MACRO_ENABLE) | ||
const uint16_t PROGMEM pl_combo_12[] = {KC_1 , KC_2, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_13[] = {KC_1 , KC_3, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_qw[] = {KC_Q , KC_W, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_qe[] = {KC_Q , KC_E, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_3e[] = {KC_3 , KC_E, COMBO_END}; | ||
COMBO(pl_combo_12, DM_PLY1), | ||
COMBO(pl_combo_13, DM_REC1), | ||
COMBO(pl_combo_qw, DM_PLY2), | ||
COMBO(pl_combo_qe, DM_REC2), | ||
COMBO(pl_combo_3e, DM_RSTP), | ||
# endif //DYNAMIC_MACRO_ENABLE | ||
}; | ||
|
||
combo_t key_combos[] = { | ||
COMBO(pl_combo_qa, C(KC_A)), | ||
COMBO(pl_combo_bsz, C(KC_Z)), | ||
COMBO(pl_combo_zx, C(KC_X)), | ||
COMBO(pl_combo_xc, C(KC_C)), | ||
COMBO(pl_combo_cv, C(KC_V)), | ||
COMBO(pl_combo_xcv, C(S(KC_V))), | ||
COMBO(pl_combo_tabq, PL_ALTSTAB), | ||
COMBO(pl_combo_tabw, PL_ALTTAB), | ||
# if defined(DYNAMIC_MACRO_ENABLE) | ||
COMBO(pl_combo_12, DM_PLY1), | ||
COMBO(pl_combo_13, DM_REC1), | ||
COMBO(pl_combo_qw, DM_PLY2), | ||
COMBO(pl_combo_qe, DM_REC2), | ||
COMBO(pl_combo_3e, DM_RSTP), | ||
# endif //DYNAMIC_MACRO_ENABLE | ||
}; | ||
|
||
//===========================// | ||
// MOUSE COMBOS // | ||
//===========================// | ||
//===========================// | ||
// MOUSE COMBOS // | ||
//===========================// | ||
#else // ! defined(IS_MOUSE) | ||
const uint16_t PROGMEM pl_combo_ms12[] = {KC_BTN1 , KC_BTN2, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_ms14[] = {KC_BTN1 , KC_BTN4, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_ms24[] = {KC_BTN2 , KC_BTN4, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_ms15[] = {KC_BTN1 , KC_BTN5, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_ms25[] = {KC_BTN2 , KC_BTN5, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_ms12[] = {KC_BTN1 , KC_BTN2, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_ms14[] = {KC_BTN1 , KC_BTN4, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_ms24[] = {KC_BTN2 , KC_BTN4, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_ms15[] = {KC_BTN1 , KC_BTN5, COMBO_END}; | ||
const uint16_t PROGMEM pl_combo_ms25[] = {KC_BTN2 , KC_BTN5, COMBO_END}; | ||
|
||
combo_t key_combos[] = { | ||
COMBO(pl_combo_ms12, DRAG_SCROLL), | ||
COMBO(pl_combo_ms14, DRAG_SCROLL), | ||
COMBO(pl_combo_ms24, DRAG_SCROLL), | ||
COMBO(pl_combo_ms15, C(KC_C)), | ||
COMBO(pl_combo_ms25, C(KC_V)), | ||
}; | ||
combo_t key_combos[] = { | ||
COMBO(pl_combo_ms12, DRAG_SCROLL), | ||
COMBO(pl_combo_ms14, DRAG_SCROLL), | ||
COMBO(pl_combo_ms24, DRAG_SCROLL), | ||
COMBO(pl_combo_ms15, C(KC_C)), | ||
COMBO(pl_combo_ms25, C(KC_V)), | ||
}; | ||
#endif // ! defined(IS_MOUSE) | ||
#ifdef PLODAH_BORING_LAYER | ||
void plodah_layerchange_comboactions(layer_state_t state){ | ||
switch (get_highest_layer(state)) { | ||
case PLODAH_BORING_LAYER: | ||
if(is_combo_enabled()){ | ||
combo_disable(); | ||
} | ||
break; | ||
default: | ||
if(! is_combo_enabled()){ | ||
combo_enable(); | ||
} | ||
break; | ||
|
||
bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode, keyrecord_t *record) { | ||
# if defined(PLODAH_BORING_LAYER ) | ||
if(layer_state_is(PLODAH_BORING_LAYER)){ | ||
return false; | ||
} | ||
# endif // PLODAH_BORING_LAYER | ||
return true; | ||
} | ||
#endif // PLODAH_BORING_LAYER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters