diff options
author | Gergely Nagy <algernon@keyboard.io> | 2018-07-02 23:44:32 +0200 |
---|---|---|
committer | Gergely Nagy <algernon@keyboard.io> | 2018-07-02 23:44:32 +0200 |
commit | d9c5d7022f04d1362939de615910df8f9e18c2a8 (patch) | |
tree | 00af88bfa8f7bbedd099eadddee077e50b005b9d | |
parent | 1e6c2c702c98a087fdfc01c12cef705c6ba693af (diff) | |
download | model01-firmware-d9c5d7022f04d1362939de615910df8f9e18c2a8.tar.gz model01-firmware-d9c5d7022f04d1362939de615910df8f9e18c2a8.tar.bz2 model01-firmware-d9c5d7022f04d1362939de615910df8f9e18c2a8.zip |
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>
-rw-r--r-- | Model01-Firmware.ino | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Model01-Firmware.ino b/Model01-Firmware.ino index cca405c..bc45ee3 100644 --- a/Model01-Firmware.ino +++ b/Model01-Firmware.ino @@ -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 |