logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

test_combos.c (972B)


  1. #include <quantum.h>
  2. // Define some combos to use for the test, including overlapping combos and
  3. // combos that chord tap-hold keys.
  4. enum combo_events { AB_COMBO, BC_COMBO, AD_COMBO, DE_COMBO, FGHI_COMBO };
  5. const uint16_t ab_combo[] PROGMEM = {KC_A, KC_B, COMBO_END};
  6. const uint16_t bc_combo[] PROGMEM = {KC_B, KC_C, COMBO_END};
  7. const uint16_t ad_combo[] PROGMEM = {KC_A, LCTL_T(KC_D), COMBO_END};
  8. const uint16_t de_combo[] PROGMEM = {LCTL_T(KC_D), LT(1, KC_E), COMBO_END};
  9. const uint16_t fghi_combo[] PROGMEM = {KC_F, KC_G, KC_H, KC_I, COMBO_END};
  10. // clang-format off
  11. combo_t key_combos[] = {
  12. [AB_COMBO] = COMBO(ab_combo, KC_SPC), // KC_A + KC_B = KC_SPC
  13. [BC_COMBO] = COMBO(bc_combo, KC_X), // KC_B + KC_C = KC_X
  14. [AD_COMBO] = COMBO(ad_combo, KC_Y), // KC_A + LCTL_T(KC_D) = KC_Y
  15. [DE_COMBO] = COMBO(de_combo, KC_Z), // LCTL_T(KC_D) + LT(1, KC_E) = KC_Z
  16. [FGHI_COMBO] = COMBO(fghi_combo, KC_W) // KC_F + KC_G + KC_H + KC_I = KC_W
  17. };