From 8e29f3a7055c683959bdb4c23dbc6df32427ce60 Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Mon, 21 Mar 2022 20:28:27 -0500 Subject: [PATCH] Replace `::Kaleidoscope` with `kaleidoscope::Runtime` Signed-off-by: Michael Richters --- .../src/kaleidoscope/plugin/DynamicTapDance.cpp | 10 +++++----- .../src/kaleidoscope/plugin/mousekeys/MouseWrapper.cpp | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/Kaleidoscope-DynamicTapDance/src/kaleidoscope/plugin/DynamicTapDance.cpp b/plugins/Kaleidoscope-DynamicTapDance/src/kaleidoscope/plugin/DynamicTapDance.cpp index 27ecd3c9..b0e5d232 100644 --- a/plugins/Kaleidoscope-DynamicTapDance/src/kaleidoscope/plugin/DynamicTapDance.cpp +++ b/plugins/Kaleidoscope-DynamicTapDance/src/kaleidoscope/plugin/DynamicTapDance.cpp @@ -41,7 +41,7 @@ void DynamicTapDance::updateDynamicTapDanceCache() { map_[0] = 0; while (pos < storage_base_ + storage_size_) { - uint16_t raw_key = Kaleidoscope.storage().read(pos); + uint16_t raw_key = Runtime.storage().read(pos); pos += 2; Key key(raw_key); @@ -67,7 +67,7 @@ bool DynamicTapDance::dance(uint8_t tap_dance_index, KeyAddr key_addr, return false; Key key; - Kaleidoscope.storage().get(storage_base_ + pos, key); + Runtime.storage().get(storage_base_ + pos, key); switch (tap_dance_action) { case TapDance::Tap: @@ -103,7 +103,7 @@ EventHandlerResult DynamicTapDance::onFocusEvent(const char *command) { if (::Focus.isEOL()) { for (uint16_t i = 0; i < storage_size_; i += 2) { Key k; - Kaleidoscope.storage().get(storage_base_ + i, k); + Runtime.storage().get(storage_base_ + i, k); ::Focus.send(k); } } else { @@ -113,10 +113,10 @@ EventHandlerResult DynamicTapDance::onFocusEvent(const char *command) { Key k; ::Focus.read(k); - Kaleidoscope.storage().put(storage_base_ + pos, k); + Runtime.storage().put(storage_base_ + pos, k); pos += 2; } - Kaleidoscope.storage().commit(); + Runtime.storage().commit(); updateDynamicTapDanceCache(); } } diff --git a/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/mousekeys/MouseWrapper.cpp b/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/mousekeys/MouseWrapper.cpp index 70db9a62..60305664 100644 --- a/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/mousekeys/MouseWrapper.cpp +++ b/plugins/Kaleidoscope-MouseKeys/src/kaleidoscope/plugin/mousekeys/MouseWrapper.cpp @@ -38,7 +38,7 @@ uint8_t MouseWrapper::speed_limit = 127; void MouseWrapper::warpJump(uint16_t left, uint16_t top, uint16_t height, uint16_t width) { uint16_t x_center = left + width / 2; uint16_t y_center = top + height / 2; - Kaleidoscope.hid().absoluteMouse().moveTo(x_center, y_center, 0); + Runtime.hid().absoluteMouse().moveTo(x_center, y_center, 0); } void MouseWrapper::beginWarping() { @@ -131,7 +131,7 @@ void MouseWrapper::move(int8_t x, int8_t y) { endWarping(); // move by whole pixels, not subpixels - Kaleidoscope.hid().mouse().move(moveX / subpixels_per_pixel, moveY / subpixels_per_pixel); + Runtime.hid().mouse().move(moveX / subpixels_per_pixel, moveY / subpixels_per_pixel); // save leftover subpixel movements for later remainderX = moveX - moveX / subpixels_per_pixel * subpixels_per_pixel; remainderY = moveY - moveY / subpixels_per_pixel * subpixels_per_pixel;