r/olkb•
ReelBigFizz

Trouble getting qmk combos to work on Planck rev 6

I'm trying to get combos to work on my planck. I pulled down the latest from the qmk repo and copied the examples from the page into my setup.

I get this error when I try to run make:

Compiling: quantum/process_keycode/process_combo.c                                                 In file included from quantum/process_keycode/process_combo.c:18:0:
quantum/process_keycode/process_combo.c: In function 'matrix_scan_combo':
quantum/process_keycode/process_combo.h:54:20: error: 'TAPPING_TERM' undeclared (first use in this function)
 #define COMBO_TERM TAPPING_TERM
                    ^
quantum/process_keycode/process_combo.c:169:52: note: in expansion of macro 'COMBO_TERM'
   if (is_active && timer && timer_elapsed(timer) > COMBO_TERM) {
                                                    ^~~~~~~~~~
quantum/process_keycode/process_combo.h:54:20: note: each undeclared identifier is reported only once for each function it appears in
 #define COMBO_TERM TAPPING_TERM
                    ^
quantum/process_keycode/process_combo.c:169:52: note: in expansion of macro 'COMBO_TERM'
   if (is_active && timer && timer_elapsed(timer) > COMBO_TERM) {

I must have something wrong with my configuration since I've seen other people successfully use combos, but it seems odd that the errors would be in the QMK files.

Any ideas?

Posted Jun 10, 2019, 12:48 AM UTC

610
equalunique•

A broken combo feature is a known issue for ARM boards like the Planck rev 6, Planck Light, and Preonic Rev 3. See: https://github.com/qmk/qmk_firmware/issues/4321

4
ReelBigFizzOP•

Different issue than I'm having, but good to know that to wouldn't work anyway.

2
shinmaiPreonic & Planck, Halo Clears & Zealio Purples•

Combos definitely do work on Planck rev6 and Preonic rev3, for the most part at least (both my Planck and my Preonic have enter mapped to J+K).

I guess someone should do what rsheldiii suggested in the linked issue and see if it still persists after #4424 was closed by the merging of #2561. If I don't procrastinate too much, I'll try and do that tonight.

2
ReelBigFizzOP•

OK. Any clue what my issue could be then? Why would TAPPING_TERM not be defined in process_combo.c? I'm not exactly a C wizard, but I don't see how my configuration could affect that.

1
ReelBigFizzOP•

Or, could you share your keyboard files? I'm pretty stuck on this error. I haven't been able to find other examples using combos.

1
shinmaiPreonic & Planck, Halo Clears & Zealio Purples•

My qmk fork is sort of a mess right now (I'm big on the "do as I say, not as I do" thing when it comes to project management and organization 😅), but here are my combo-related things from my keymap, if these aren't helpful I'll try to whip my fork into some kind of readable shape ASAP.

rules.mk

COMBO_ENABLE = yes

config.h

#define TAPPING_TERM 137
#define COMBO_COUNT 2
#define COMBO_TERM 35

keymap.c

enum combo_events {
  JK_ENTER,
  MM_F23
};

const uint16_t PROGMEM jkent_combo[] = {KC_J, KC_K, COMBO_END};
const uint16_t PROGMEM m1m2_combo[] = {M1, M2, COMBO_END};
combo_t key_combos[COMBO_COUNT] = {\
  [JK_ENTER] = COMBO(jkent_combo, KC_ENT),\
  [MM_F23] = COMBO_ACTION(m1m2_combo),\
};

bool cancel_next_macro_td;

void process_combo_event(uint8_t combo_index, bool pressed) {
  if(combo_index == MM_F23) {
    tap_code(KC_F23);
    cancel_next_macro_td = true;
  }
}

I only have the two combos on my Planck, and the other one if for my weird two-key F13-F24 thing, but all of that works perfect for me.

2
drashnaQMK Collaborator - ZSA Technology - Ergodox/Corne/Iris/Planck•

Add #define TAPPING_TERM 200

2
ReelBigFizzOP•

Thanks for the quick reply! You're talking about in my `config.h` file right? I already have that defined in there. I tried defining it in my `rules.mk` and `keymap.c` as well, with similar results.

1
drashnaQMK Collaborator - ZSA Technology - Ergodox/Corne/Iris/Planck•

Yes, it would be in your config.h file

1