diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Macros.cpp | 13 | ||||
-rw-r--r-- | src/Macros.h | 2 | ||||
-rw-r--r-- | src/MagicCombo.cpp | 2 | ||||
-rw-r--r-- | src/TapDance.cpp | 2 | ||||
-rw-r--r-- | src/TapDance.h | 2 | ||||
-rw-r--r-- | src/model01.ino | 2 |
6 files changed, 11 insertions, 12 deletions
diff --git a/src/Macros.cpp b/src/Macros.cpp index c8013cc..529bfca 100644 --- a/src/Macros.cpp +++ b/src/Macros.cpp @@ -16,6 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. **********************************************************************/ +#include <Kaleidoscope.h> #include <Kaleidoscope-OneShot.h> #include "Macros.h" @@ -29,18 +30,16 @@ * https://github.com/keyboardio/Kaleidoscope/issues/647 */ #define TopRow(k1, k2) \ - if (keyToggledOn(keyState)) { \ - if (kaleidoscope::hid::isModifierKeyActive(Key_LeftControl) || \ - ::OneShot.isModifierActive(Key_LeftControl) || \ - kaleidoscope::hid::isModifierKeyActive(Key_RightAlt) || \ - ::OneShot.isModifierActive(Key_RightAlt)) \ + if (keyToggledOn(event.state)) { \ + if (Kaleidoscope.hid().keyboard().wasModifierKeyActive(Key_LeftControl) || \ + Kaleidoscope.hid().keyboard().wasModifierKeyActive(Key_RightAlt)) \ return MACRO(Dr(k2)); \ else \ return MACRO(Dr(k1)); \ }; -const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState) { - switch (macroIndex) { +const macro_t *macroAction(uint8_t macro_id, KeyEvent &event) { + switch (macro_id) { case AT: TopRow(LSHIFT(Key_2), Key_2); case STAR: TopRow(LSHIFT(Key_8), Key_3); case DOLLAR: TopRow(LSHIFT(Key_4), Key_4); diff --git a/src/Macros.h b/src/Macros.h index 829308c..5e4395c 100644 --- a/src/Macros.h +++ b/src/Macros.h @@ -34,4 +34,4 @@ enum { , RIGHT_BRACKET }; -extern const macro_t *macroAction(uint8_t macroIndex, uint8_t keyState); +extern const macro_t *macroAction(uint8_t macro_id, KeyEvent &event); diff --git a/src/MagicCombo.cpp b/src/MagicCombo.cpp index a67566e..f24e221 100644 --- a/src/MagicCombo.cpp +++ b/src/MagicCombo.cpp @@ -21,5 +21,5 @@ #include "MagicCombo.h" void comboMiddleClick(uint8_t combo_index) { - ::Macros.play(MACRO(T(mouseBtnM))); + Macros.play(MACRO(T(mouseBtnM))); } diff --git a/src/TapDance.cpp b/src/TapDance.cpp index e5f870d..7af5393 100644 --- a/src/TapDance.cpp +++ b/src/TapDance.cpp @@ -20,7 +20,7 @@ #include "TapDance.h" bool cancelOneShot = false; -void tapDanceAction(uint8_t tapDanceIndex, byte row, byte col, uint8_t tapCount, +void tapDanceAction(uint8_t tapDanceIndex, KeyAddr keyAddr, uint8_t tapCount, kaleidoscope::plugin::TapDance::ActionType tapDanceAction) { /* Cancel any pending on-shot effects when a tap-dance key is released */ if (tapDanceAction == kaleidoscope::plugin::TapDance::Release) diff --git a/src/TapDance.h b/src/TapDance.h index ff90f5e..7129259 100644 --- a/src/TapDance.h +++ b/src/TapDance.h @@ -27,5 +27,5 @@ enum { }; extern bool cancelOneShot; -extern void tapDanceAction(uint8_t tapDanceIndex, byte row, byte col, uint8_t tapCount, +extern void tapDanceAction(uint8_t tapDanceIndex, KeyAddr keyAddr, uint8_t tapCount, kaleidoscope::plugin::TapDance::ActionType tapDanceAction); diff --git a/src/model01.ino b/src/model01.ino index 8d33fba..ba6f088 100644 --- a/src/model01.ino +++ b/src/model01.ino @@ -63,7 +63,7 @@ void setup() { MouseKeys.speed = 15; MouseKeys.accelDelay = 35; - IdleLEDs.idle_time_limit = 60; + IdleLEDs.setIdleTimeoutSeconds(60); } void loop() { |