mirror of
https://github.com/qmk/qmk_userspace.git
synced 2025-12-19 12:30:20 -05:00
Re-enabling combos
- implement mouse buttons - activate certain layers with thumbs - update readme for clarity
This commit is contained in:
parent
d40809e5a6
commit
8a48499504
5 changed files with 89 additions and 46 deletions
|
|
@ -6,28 +6,29 @@
|
|||
//const uint16_t PROGMEM sniptog_combo[] = {KC_M, TR_DOT, COMBO_END};
|
||||
//const uint16_t PROGMEM moubtn4_combo[] = {KC_SPC, NAV, COMBO_END};
|
||||
|
||||
combo_t key_combos[COMBO_LENGTH] = {
|
||||
|
||||
/*
|
||||
#if defined(POINTING_DEVICE_ENABLE)
|
||||
[DRAGTOGGLE] = COMBO(dragtog_combo, DRG_TOG),
|
||||
[SNIPERTOGGLE] = COMBO(sniptog_combo, SNP_TOG),
|
||||
#else
|
||||
[DRAGTOGGLE] = COMBO(dragtog_combo, ___x___),
|
||||
[SNIPERTOGGLE] = COMBO(sniptog_combo, ___x___),
|
||||
#endif //POINTING_DEVICE_ENABLE
|
||||
mouse buttons to map
|
||||
- mb1 left 1 df
|
||||
- mb2 right 3 dg
|
||||
- mb3 middle
|
||||
- mb4 back 2 cv
|
||||
- mb5 forward
|
||||
|
||||
#if defined(MOUSELAYER_ENABLE)
|
||||
[MOUSEBUTTON4] = COMBO(moubtn4_combo, KC_BTN4)
|
||||
#else
|
||||
[MOUSEBUTTON4] = COMBO(moubtn4_combo, ___x___)
|
||||
#endif //MOUSELAYER_ENABLE
|
||||
bigrams that may work for mouse
|
||||
- cv
|
||||
- cb
|
||||
- xc
|
||||
- cv
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
bool get_combo_must_hold(uint16_t index, combo_t *combo) {
|
||||
switch (index) {
|
||||
|
||||
case LYR_CONFIG:
|
||||
case LYR_FUNCTION:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
@ -44,6 +45,11 @@ bool get_combo_must_tap(uint16_t index, combo_t *combo) {
|
|||
return true;
|
||||
*/
|
||||
|
||||
case MOUSE_BUTTON1:
|
||||
case MOUSE_BUTTON2:
|
||||
case MOUSE_BUTTON4:
|
||||
case MOUSE_DRGTOG:
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
@ -53,10 +59,14 @@ bool get_combo_must_press_in_order(uint16_t combo_index, combo_t *combo) {
|
|||
switch (combo_index) {
|
||||
/* List combos here that you want to only activate if their keys
|
||||
* are pressed in the same order as they are defined in the combo's key
|
||||
* array. */
|
||||
* array.
|
||||
*
|
||||
* return false means they do not have to be pressed in order
|
||||
*
|
||||
* */
|
||||
|
||||
default:
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,10 +3,49 @@
|
|||
|
||||
enum combos {
|
||||
//DRAGTOGGLE,
|
||||
//SNIPERTOGGLE,
|
||||
//SNIPERTOGGLE,c
|
||||
//MOUSEBUTTON4,
|
||||
|
||||
#if defined(MOUSELAYER_ENABLE)
|
||||
MOUSE_BUTTON1,
|
||||
MOUSE_BUTTON2,
|
||||
MOUSE_BUTTON4,
|
||||
MOUSE_DRGTOG,
|
||||
#endif //MOUSELAYER_ENABLE
|
||||
|
||||
KB_TAB,
|
||||
KB_BSPC,
|
||||
LYR_CONFIG,
|
||||
LYR_FUNCTION,
|
||||
COMBO_LENGTH
|
||||
};
|
||||
|
||||
#if defined(MOUSELAYER_ENABLE)
|
||||
const uint16_t PROGMEM mou_btn1_combo[] = { KC_D, KC_F, COMBO_END };
|
||||
const uint16_t PROGMEM mou_btn2_combo[] = { KC_D, KC_G, COMBO_END };
|
||||
const uint16_t PROGMEM mou_btn4_combo[] = { KC_C, KC_V, COMBO_END };
|
||||
const uint16_t PROGMEM mou_drg_combo[] = { TR_COMM, TR_DOT, COMBO_END };
|
||||
#endif //MOUSELAYER_ENABLE
|
||||
|
||||
const uint16_t PROGMEM kb_tab_combo[] = { KC_S, KC_F, COMBO_END };
|
||||
const uint16_t PROGMEM kb_bspc_combo[] = { KC_J, KC_L, COMBO_END };
|
||||
const uint16_t PROGMEM lyr_cfg_combo[] = { KC_SPC, NAV, COMBO_END };
|
||||
const uint16_t PROGMEM lyr_fun_combo[] = { NUM, TR_LSFT, COMBO_END };
|
||||
|
||||
combo_t key_combos[COMBO_LENGTH] = {
|
||||
|
||||
#if defined(MOUSELAYER_ENABLE)
|
||||
[MOUSE_BUTTON1] = COMBO(mou_btn1_combo, TR_BTN1),
|
||||
[MOUSE_BUTTON2] = COMBO(mou_btn2_combo, TR_BTN2),
|
||||
[MOUSE_BUTTON4] = COMBO(mou_btn4_combo, TR_BTN4),
|
||||
[MOUSE_BUTTON4] = COMBO(mou_drg_combo, TR_DRGS),
|
||||
#endif //MOUSELAYER_ENABLE
|
||||
|
||||
[KB_TAB] = COMBO(kb_tab_combo, KC_TAB),
|
||||
[KB_BSPC] = COMBO(kb_bspc_combo, KC_BSPC),
|
||||
[LYR_CONFIG] = COMBO(lyr_cfg_combo, CONFIG),
|
||||
[LYR_FUNCTION] = COMBO(lyr_fun_combo, FUNC)
|
||||
};
|
||||
|
||||
//their documentation is so confusing because you don't use COMBO_LEN defining the actions
|
||||
uint16_t COMBO_LEN = COMBO_LENGTH;
|
||||
Loading…
Add table
Add a link
Reference in a new issue