1
0

Don't use an enum for MagicCombo.

Since we use a dedicated function for the single magic combo we have, using an
enum in this case is just more confusing than if we didn't. For this reason,
drop the use of enum, and just specify the array directly.

Thanks @obra for the suggestion!

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
This commit is contained in:
Gergely Nagy 2018-07-02 23:44:32 +02:00
parent 1e6c2c702c
commit d9c5d7022f

View File

@ -297,6 +297,10 @@ enum {
COMBO_TOGGLE_NKRO_MODE
};
/** A tiny wrapper, to be used by MagicCombo.
* This simply toggles the keyboard protocol via USBQuirks, and wraps it within
* a function with an unused argument, to match what MagicCombo expects.
*/
static void toggleKeyboardProtocol(uint8_t combo_index) {
USBQuirks.toggleKeyboardProtocol();
}
@ -304,10 +308,10 @@ static void toggleKeyboardProtocol(uint8_t combo_index) {
/** Magic combo list, a list of key combo and action pairs the firmware should
* recognise.
*/
USE_MAGIC_COMBOS([COMBO_TOGGLE_NKRO_MODE] = {.action = toggleKeyboardProtocol,
// Left Fn + Esc + Shift
.keys = { R3C6, R2C6, R3C7 }
});
USE_MAGIC_COMBOS({.action = toggleKeyboardProtocol,
// Left Fn + Esc + Shift
.keys = { R3C6, R2C6, R3C7 }
});
// First, tell Kaleidoscope which plugins you want to use.
// The order can be important. For example, LED effects are