From ddc69ea7351ec90e59653b97a1d209f15c4f9967 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 16 Jun 2020 11:26:32 +0200 Subject: [PATCH 1/7] docs/UPGRADING.md: Minor formatting fixes Signed-off-by: Gergely Nagy --- docs/UPGRADING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md index fadc0ac4..4e20b746 100644 --- a/docs/UPGRADING.md +++ b/docs/UPGRADING.md @@ -566,11 +566,11 @@ The following headers and names have changed: ### Removed on 2020-01-06 -### EEPROMKeymap mode +#### EEPROMKeymap mode The [EEPROM-Keymap](doc/plugin/EEPROM-Keymap.md) plugin had its `setup()` method changed, the formerly optional `method` argument is now obsolete and unused. It can be safely removed. -## keymaps array and KEYMAPS and KEYMAPS_STACKED macros +##### keymaps array and KEYMAPS and KEYMAPS_STACKED macros The `keymaps` array has been replaced with a `keymaps_linear` array. This new array treats each layer as a simple one dimensional array of keys, rather than a two dimensional array of arrays of rows. At the same time, the `KEYMAPS` and `KEYMAPS_STACKED` macros that were previously defined in each hardware implmentation class have been replaced with `PER_KEY_DATA` and `PER_KEY_DATA_STACKED` macros in each hardware class. This change should be invisible to users, but will require changes by any plugin that accessed the 'keymaps' variable directly. @@ -578,13 +578,13 @@ Code like `key.raw = pgm_read_word(&(keymaps[layer][row][col])); return key;` sh ### Removed on 2019-01-18 -### Removal of Layer.defaultLayer +#### Removal of Layer.defaultLayer The `Layer.defaultLayer()` method has been deprecated, because it wasn't widely used, nor tested well, and needlessly complicated the layering logic. If one wants to set a default layer, which the keyboard switches to when booting up, `EEPROMSettings.default_layer()` may be of use. `Layer.defaultLayer` has since been removed. -### More clarity in Layer method names +#### More clarity in Layer method names A number of methods on the `Layer` object have been renamed, to make their intent clearer: From 8333dab7ce57a34c276777706e137f1cc31aa842 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 16 Jun 2020 11:09:41 +0200 Subject: [PATCH 2/7] Remove the deprecated, old device APIs Originally scheduled for removal by mid-March. This also removes the similarly deprecated named hardware object aliases. Signed-off-by: Gergely Nagy --- docs/UPGRADING.md | 8 +- src/Kaleidoscope.h | 6 - src/kaleidoscope/Hardware.h | 408 ------------------ src/kaleidoscope/device/Base.h | 9 - src/kaleidoscope/device/ez/ErgoDox.cpp | 2 - src/kaleidoscope/device/ez/ErgoDox.h | 2 - src/kaleidoscope/device/kbdfans/KBD4x.cpp | 2 - src/kaleidoscope/device/kbdfans/KBD4x.h | 2 - .../device/keyboardio/Atreus2.cpp | 2 - src/kaleidoscope/device/keyboardio/Atreus2.h | 2 - src/kaleidoscope/device/olkb/Planck.cpp | 2 - src/kaleidoscope/device/olkb/Planck.h | 2 - .../device/softhruf/Splitography.cpp | 2 - .../device/softhruf/Splitography.h | 2 - .../device/technomancy/Atreus.cpp | 2 - src/kaleidoscope/device/technomancy/Atreus.h | 2 - src/kaleidoscope_internal/deprecations.h | 27 -- 17 files changed, 7 insertions(+), 475 deletions(-) delete mode 100644 src/kaleidoscope/Hardware.h diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md index 4e20b746..c1692133 100644 --- a/docs/UPGRADING.md +++ b/docs/UPGRADING.md @@ -41,7 +41,7 @@ For end users, this doesn't come with any breaking changes. A few things have be For those wishing to port Kaleidoscope to devices it doesn't support yet, the new API should make most things considerably easier. Please see the (work in progress) documentation in [doc/device-apis.md](doc/device-apis.md). -The old symbols and APIs will be removed by **2020-03-15**. +The old symbols and APIs are no longer available. ### New plugin API @@ -564,6 +564,12 @@ The following headers and names have changed: # Removed APIs +### Removed on 2020-06-16 + +#### The old device API + +After the introduction of the new device API, the old APIs (`ROWS`, `COLS`, `LED_COUNT`, `KeyboardHardware`, the old `Hardware` base class, etc) were removed on **2020-06-16**. + ### Removed on 2020-01-06 #### EEPROMKeymap mode diff --git a/src/Kaleidoscope.h b/src/Kaleidoscope.h index ace318c9..2b85b0b0 100644 --- a/src/Kaleidoscope.h +++ b/src/Kaleidoscope.h @@ -44,8 +44,6 @@ void setup(); #include "kaleidoscope/hid.h" -static constexpr DEPRECATED(KEYBOARDHARDWARE) kaleidoscope::Device &KeyboardHardware = kaleidoscope_internal::device; - #ifdef PER_KEY_DATA_STACKED #define KEYMAP_STACKED(...) { PER_KEY_DATA_STACKED(XXX, __VA_ARGS__) } #endif @@ -54,10 +52,6 @@ static constexpr DEPRECATED(KEYBOARDHARDWARE) kaleidoscope::Device &KeyboardHard #define KEYMAP(...) { PER_KEY_DATA(XXX, __VA_ARGS__) } #endif -static constexpr DEPRECATED(ROWS) uint8_t ROWS = kaleidoscope_internal::device.matrix_rows; -static constexpr DEPRECATED(COLS) uint8_t COLS = kaleidoscope_internal::device.matrix_columns; -static constexpr DEPRECATED(LED_COUNT) uint8_t LED_COUNT = kaleidoscope_internal::device.led_count; - #include "kaleidoscope/KeyAddr.h" #include "kaleidoscope/key_events.h" #include "kaleidoscope/layers.h" diff --git a/src/kaleidoscope/Hardware.h b/src/kaleidoscope/Hardware.h deleted file mode 100644 index 522e414b..00000000 --- a/src/kaleidoscope/Hardware.h +++ /dev/null @@ -1,408 +0,0 @@ -/* -*- mode: c++ -*- - * Kaleidoscope-Hardware -- Kaleidoscope Hardware Base class - * Copyright (C) 2017, 2018 Keyboard.io, Inc - * - * This program is free software: you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free Software - * Foundation, version 3. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along with - * this program. If not, see . - */ - -/** @file kaleidoscope/Hardware.h - * Base class for Kaleidoscope hardware libraries. - */ - -#pragma once - -#ifdef __AVR__ - -#include "kaleidoscope/MatrixAddr.h" -#include "kaleidoscope_internal/deprecations.h" - -#include "EEPROM.h" - -#ifndef CRGB -#error cRGB and CRGB *must* be defined before including this header! -#endif - -/* All hardware libraries must define the following macros: - * CRGB(r,g,b) - explained below - * cRGB, a structure with at least three members: r, g, and b - - * compilation will fail otherwise. - * - * Despite its name, the members do not need to be in the order r g b -- most - * likely they will be in an order that is convenient for the hardware. So - * initializing a cRGB with a struct literal will give surprising results for any - * colors where r, g, and b do not have the same value. Each Hardware library - * defines a CRGB(r,g,b) macro which returns a literal cRGB with the given values. - */ - -namespace kaleidoscope { -/** Kaleidoscope Hardware base class. - * Essential methods all hardware libraries must implement. - */ - -struct NoopKeyAddr { - NoopKeyAddr() {} - template - NoopKeyAddr(T_) {} -}; - -class Hardware { - public: - - // To satisfy the interface of those methods that allow - // for matrix addressing we define a default key address class. - // This typedef is supposed to overridden by derived hardware classes. - typedef NoopKeyAddr KeyAddr; - - /** - * @defgroup kaleidoscope_hardware_leds Kaleidoscope::Hardware/LEDs - * @{ - */ - /** - * Sync the LEDs with the underlying hardware. This should make sure that - * changes made before this call are reflected on the device. - */ - void syncLeds(void) {} - /** - * Set the color of a per-key LED at a given row and column. - * - * Setting the color does not need to take effect immediately, it can be - * delayed until @ref syncLeds is called. - * - * @param key_addr is the matrix address of the LED. - * @param color is the color to set the LED to. - */ - void setCrgbAt(KeyAddr key_addr, cRGB color) {} - /** - * Set the color of a per-key LED at a given row and column. - * - * Setting the color does not need to take effect immediately, it can be - * delayed until @ref syncLeds is called. - * - * @param row is the logical row position of the key. - * @param col is the logical column position of the key. - * @param color is the color to set the LED to. - */ - DEPRECATED(ROW_COL_FUNC) void setCrgbAt(byte row, byte col, cRGB color) {} - /** - * Set the color of a per-key LED at a given LED index. - * - * Setting the color does not need to take effect immediately, it can be - * delayed until @ref syncLeds is called. - * - * @param i is the LED index to change the color of. - * @param color is the color to set it to. - */ - void setCrgbAt(uint8_t i, cRGB color) {} - /** - * Returns the color of the LED at a given index. - * - * @param i is the index of the LED to return the color of. - * - * @returns The color at the given position. - */ - cRGB getCrgbAt(uint8_t i) { - cRGB c = { - 0, 0, 0 - }; - return c; - } - /** - * Returns the index of the LED at a given row & column. - * - * @param key_addr is the matrix address of the LED. - * - * @returns The index of the LED at the given position, or -1 if there are no - * LEDs there. - */ - int8_t getLedIndex(KeyAddr key_addr) { - return -1; - } - /** - * Returns the index of the LED at a given row & column. - * - * @param row is the logical row position of the key. - * @param col is the logical column position of the key. - * - * @returns The index of the LED at the given position, or -1 if there are no - * LEDs there. - */ - DEPRECATED(ROW_COL_FUNC) int8_t getLedIndex(uint8_t row, byte col) { - return -1; - } - /** @} */ - - /** @defgroup kaleidoscope_hardware_matrix Kaleidoscope::Hardware/Matrix - * @{ - */ - /** - * Scan the keyboard matrix, and act on it. - */ - void scanMatrix(void) {} - /** - * Read the state of the keyboard matrix. - * - * Do whatever is necessary to read the current keyboard state - but without - * acting on it. - * - * This is primarily used by @ref scanMatrix, but may have other uses too. - */ - void readMatrix(void) {} - /** - * Act on the scanned keyboard matrix. - * - * Iterate through the scanned state (@see readMatrix), and act on any events. - */ - void actOnMatrixScan(void) {} - /** @} */ - - /** @defgroup kaleidoscope_hardware_masking Kaleidoscope::Hardware/Key masking - * - * Sometimes there are situations when one wants to ignore key events for a - * while, to mask them out. Masked keys will be ignored until they are - * released. - * - * This is implemented in the Hardware library because that knows best how - * to mask efficiently, as this requires a deeper knowledge of the hardware, - * which is all but hidden from the rest of the plugins. - * @{ - */ - /** - * Mask out a key. - * - * Masking a key out means that any other event than a release will be - * ignored until said release. - * - * @param key_addr is the matrix address of the key. - */ - void maskKey(KeyAddr key_addr) {} - /** - * Mask out a key. - * - * Masking a key out means that any other event than a release will be - * ignored until said release. - * - * @param row is the row the key is located at in the matrix. - * @param col is the column the key is located at in the matrix. - */ - DEPRECATED(ROW_COL_FUNC) void maskKey(byte row, byte col) {} - /** - * Unmask a key. - * - * Remove the mask - if any - for a given key. To be used when the mask - * needs to be removed without the key being released. - * - * @param key_addr is the matrix address of the key. - */ - void unMaskKey(KeyAddr key_addr) {} - /** - * Unmask a key. - * - * Remove the mask - if any - for a given key. To be used when the mask - * needs to be removed without the key being released. - * - * @param row is the row the key is located at in the matrix. - * @param col is the column the key is located at in the matrix. - */ - void unMaskKey(byte row, byte col) {} - /** - * Check whether a key is masked or not. - * - * @param key_addr is the matrix address of the key. - * - * @returns true if the key is masked, false otherwise. - */ - bool isKeyMasked(KeyAddr key_addr) { - return false; - } - /** - * Check whether a key is masked or not. - * - * @param row is the row the key is located at in the matrix. - * @param col is the column the key is located at in the matrix. - * - * @returns true if the key is masked, false otherwise. - */ - DEPRECATED(ROW_COL_FUNC) bool isKeyMasked(byte row, byte col) { - return false; - } - /** @} */ - - /** @defgroup kaleidoscope_hardware_reattach Kaleidoscope::Hardware/Attach & Detach - * - * In situations where one wants to re-initialize the devices, perhaps to - * change settings inbetween, detaching from and then attaching back to the - * host is a desirable feature to have. Especially if this does not cut power, - * nor reboot the device. - * - * Because different hardware has different ways to accomplish this, the - * hardware plugin must provide these functions. Kaleidoscope will wrap them, - * so user code does not have to deal with `Runtime.device()`. - * @{ - */ - /** - * Detach the device from the host. - * - * Must detach the device, without rebooting or cutting power. Only the end - * points should get detached, the device must remain powered on. - */ - void detachFromHost() { - UDCON |= _BV(DETACH); - } - /** - * Attack the device to the host. - * - * Must restore the link detachFromHost severed. - */ - DEPRECATED(HARDWARE_BASE_CLASS) void attachToHost() { - UDCON &= ~_BV(DETACH); - } - /** @} */ - - /** - * @defgroup kaleidoscope_hardware_keyswitch_state Kaleidoscope::Hardware/Key-switch state - * - * These methods offer a way to peek at the key switch states, for those cases - * where we need to deal with the state closest to the hardware. Some methods - * offer a way to check if a key is pressed, others return the number of - * pressed keys. - * - * @{ - */ - /** - * Check if a key is pressed at a given position. - * - * @param key_addr is the matrix address of the key. - * - * @returns true if the key is pressed, false otherwise. - */ - bool isKeyswitchPressed(KeyAddr key_addr) { - return false; - } - /** - * Check if a key is pressed at a given position. - * - * @param row is the row the key is located at in the matrix. - * @param col is the column the key is located at in the matrix. - * - * @returns true if the key is pressed, false otherwise. - */ - DEPRECATED(ROW_COL_FUNC) bool isKeyswitchPressed(byte row, byte col) { - return false; - } - /** - * Check if a key is pressed at a given position. - * - * @param keyIndex is the key index, as calculated by `keyIndex`. - * - * @note Key indexes start at 1, not 0! - * - * @returns true if the key is pressed, false otherwise. - */ - bool isKeyswitchPressed(uint8_t keyIndex) { - return false; - } - /** - * Check the number of key switches currently pressed. - * - * @returns the number of keys pressed. - */ - uint8_t pressedKeyswitchCount() { - return 0; - } - - /** - * Check if a key was pressed at a given position on the previous scan - * - * @param row is the row the key is located at in the matrix. - * @param col is the column the key is located at in the matrix. - * - * @returns true if the key was pressed, false otherwise. - */ - DEPRECATED(ROW_COL_FUNC) bool wasKeyswitchPressed(byte row, byte col) { - return false; - } - /** - * Check if a key was pressed at a given position on the previous scan - * - * @param key_addr is the matrix address of the key. - * - * @returns true if the key was pressed, false otherwise. - */ - bool wasKeyswitchPressed(KeyAddr key_addr) { - return false; - } - /** - * Check if a key was pressed at a given position on the previous scan. - * - * @param keyIndex is the key index, as calculated by `keyIndex`. - * - * @note Key indexes start at 1, not 0! - * - * @returns true if the key was pressed, false otherwise. - */ - bool wasKeyswitchPressed(uint8_t keyIndex) { - return false; - } - - /** - * Check the number of key switches pressed in the previous scan. - * - * @returns the number of keys pressed. - */ - uint8_t previousPressedKeyswitchCount() { - return 0; - } - - - /** @} */ - - /** - * @defgroup kaleidoscope_hardware_misc Kaleidoscope::Hardware/Miscellaneous methods - * @{ - */ - /** - * Method to do any hardware-specific initialization. - * - * Called once when the device boots, this should initialize the device, and - * bring it up into a useful state. - */ - DEPRECATED(HARDWARE_BASE_CLASS) void setup() {} - - /** - * Method to configure the device for a hardware test mode - * - * Called by the Kaleidoscope Hardware test plugin, this method should - * do any device-specific initialization needed for factory hardware testing - * - */ - void enableHardwareTestMode() {} - - /** - * Method to return the object the hardware uses for storage. - */ - auto storage() -> decltype(EEPROM) & { - return EEPROM; - } - - /** - * Method to return the serial port object used by the hardware. - */ - auto serialPort() -> decltype(Serial) & { - return Serial; - } - - /** @} */ -}; -} - -#endif diff --git a/src/kaleidoscope/device/Base.h b/src/kaleidoscope/device/Base.h index d9ac0652..fb1eb868 100644 --- a/src/kaleidoscope/device/Base.h +++ b/src/kaleidoscope/device/Base.h @@ -510,15 +510,6 @@ class Base { */ void enableHardwareTestMode() {} - /** - * Method to put the device into programmable/bootloader mode. - * - * This is the old, legacy name of the method. - */ - DEPRECATED(HARDWARE_RESETDEVICE) void resetDevice() { - bootloader_.rebootBootloader(); - } - /** * Method to put the device into programmable/bootloader mode. */ diff --git a/src/kaleidoscope/device/ez/ErgoDox.cpp b/src/kaleidoscope/device/ez/ErgoDox.cpp index 1b180a49..259ada3c 100644 --- a/src/kaleidoscope/device/ez/ErgoDox.cpp +++ b/src/kaleidoscope/device/ez/ErgoDox.cpp @@ -232,7 +232,5 @@ uint8_t ErgoDox::pressedKeyswitchCount() { } } -kaleidoscope::device::ez::ErgoDox &ErgoDox = kaleidoscope_internal::device; - #endif #endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD diff --git a/src/kaleidoscope/device/ez/ErgoDox.h b/src/kaleidoscope/device/ez/ErgoDox.h index d2365040..c3cd1da6 100644 --- a/src/kaleidoscope/device/ez/ErgoDox.h +++ b/src/kaleidoscope/device/ez/ErgoDox.h @@ -143,6 +143,4 @@ EXPORT_DEVICE(kaleidoscope::device::ez::ErgoDox) } -extern kaleidoscope::device::ez::ErgoDox DEPRECATED(NAMED_HARDWARE) &ErgoDox; - #endif diff --git a/src/kaleidoscope/device/kbdfans/KBD4x.cpp b/src/kaleidoscope/device/kbdfans/KBD4x.cpp index cda2f0ba..963cbd67 100644 --- a/src/kaleidoscope/device/kbdfans/KBD4x.cpp +++ b/src/kaleidoscope/device/kbdfans/KBD4x.cpp @@ -33,7 +33,5 @@ ATMEGA_KEYSCANNER_BOILERPLATE } } -kaleidoscope::device::kbdfans::KBD4x &KBD4x = kaleidoscope_internal::device; - #endif #endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD diff --git a/src/kaleidoscope/device/kbdfans/KBD4x.h b/src/kaleidoscope/device/kbdfans/KBD4x.h index 02726e85..5865f90d 100644 --- a/src/kaleidoscope/device/kbdfans/KBD4x.h +++ b/src/kaleidoscope/device/kbdfans/KBD4x.h @@ -72,6 +72,4 @@ EXPORT_DEVICE(kaleidoscope::device::kbdfans::KBD4x) } -extern kaleidoscope::device::kbdfans::KBD4x DEPRECATED(NAMED_HARDWARE) &KBD4x; - #endif diff --git a/src/kaleidoscope/device/keyboardio/Atreus2.cpp b/src/kaleidoscope/device/keyboardio/Atreus2.cpp index 24f05e64..5a0ad92d 100644 --- a/src/kaleidoscope/device/keyboardio/Atreus2.cpp +++ b/src/kaleidoscope/device/keyboardio/Atreus2.cpp @@ -32,7 +32,5 @@ ATMEGA_KEYSCANNER_BOILERPLATE } } -kaleidoscope::device::keyboardio::Atreus &Atreus = kaleidoscope_internal::device; - #endif #endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD diff --git a/src/kaleidoscope/device/keyboardio/Atreus2.h b/src/kaleidoscope/device/keyboardio/Atreus2.h index 57a924f0..db8082c7 100644 --- a/src/kaleidoscope/device/keyboardio/Atreus2.h +++ b/src/kaleidoscope/device/keyboardio/Atreus2.h @@ -68,6 +68,4 @@ EXPORT_DEVICE(kaleidoscope::device::keyboardio::Atreus) } -extern kaleidoscope::device::keyboardio::Atreus DEPRECATED(NAMED_HARDWARE) &Atreus; - #endif diff --git a/src/kaleidoscope/device/olkb/Planck.cpp b/src/kaleidoscope/device/olkb/Planck.cpp index 46781c1b..94b50c48 100644 --- a/src/kaleidoscope/device/olkb/Planck.cpp +++ b/src/kaleidoscope/device/olkb/Planck.cpp @@ -31,7 +31,5 @@ ATMEGA_KEYSCANNER_BOILERPLATE } } -kaleidoscope::device::olkb::Planck &Planck = kaleidoscope_internal::device; - #endif #endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD diff --git a/src/kaleidoscope/device/olkb/Planck.h b/src/kaleidoscope/device/olkb/Planck.h index 497276ef..20806af0 100644 --- a/src/kaleidoscope/device/olkb/Planck.h +++ b/src/kaleidoscope/device/olkb/Planck.h @@ -52,6 +52,4 @@ EXPORT_DEVICE(kaleidoscope::device::olkb::Planck) } -extern kaleidoscope::device::olkb::Planck DEPRECATED(NAMED_HARDWARE) &Planck; - #endif diff --git a/src/kaleidoscope/device/softhruf/Splitography.cpp b/src/kaleidoscope/device/softhruf/Splitography.cpp index 3fd693c4..53bb0b05 100644 --- a/src/kaleidoscope/device/softhruf/Splitography.cpp +++ b/src/kaleidoscope/device/softhruf/Splitography.cpp @@ -38,7 +38,5 @@ ATMEGA_KEYSCANNER_BOILERPLATE } } -kaleidoscope::device::softhruf::Splitography &Splitography = kaleidoscope_internal::device; - #endif #endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD diff --git a/src/kaleidoscope/device/softhruf/Splitography.h b/src/kaleidoscope/device/softhruf/Splitography.h index d1f9d66e..3345b4ed 100644 --- a/src/kaleidoscope/device/softhruf/Splitography.h +++ b/src/kaleidoscope/device/softhruf/Splitography.h @@ -96,6 +96,4 @@ EXPORT_DEVICE(kaleidoscope::device::softhruf::Splitography) } -extern kaleidoscope::device::softhruf::Splitography DEPRECATED(NAMED_HARDWARE) &Splitography; - #endif diff --git a/src/kaleidoscope/device/technomancy/Atreus.cpp b/src/kaleidoscope/device/technomancy/Atreus.cpp index 42a30a62..27d325d2 100644 --- a/src/kaleidoscope/device/technomancy/Atreus.cpp +++ b/src/kaleidoscope/device/technomancy/Atreus.cpp @@ -40,7 +40,5 @@ ATMEGA_KEYSCANNER_BOILERPLATE } } -kaleidoscope::device::technomancy::Atreus &Atreus = kaleidoscope_internal::device; - #endif #endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD diff --git a/src/kaleidoscope/device/technomancy/Atreus.h b/src/kaleidoscope/device/technomancy/Atreus.h index a25855a1..555bca27 100644 --- a/src/kaleidoscope/device/technomancy/Atreus.h +++ b/src/kaleidoscope/device/technomancy/Atreus.h @@ -85,6 +85,4 @@ EXPORT_DEVICE(kaleidoscope::device::technomancy::Atreus) } -extern kaleidoscope::device::technomancy::Atreus DEPRECATED(NAMED_HARDWARE) &Atreus; - #endif diff --git a/src/kaleidoscope_internal/deprecations.h b/src/kaleidoscope_internal/deprecations.h index 43a96c86..190d4f52 100644 --- a/src/kaleidoscope_internal/deprecations.h +++ b/src/kaleidoscope_internal/deprecations.h @@ -31,33 +31,6 @@ "The HID facade in the `kaleidoscope::hid` namespace is deprecated.\n" __NL__ \ "Please use `Kaleidoscope.hid()` instead." -#define _DEPRECATED_MESSAGE_NAMED_HARDWARE __NL__ \ - "Named hardware objects are deprecated, please use\n" __NL__ \ - "`Kaleidoscope.device()` instead." - -#define _DEPRECATED_MESSAGE_KEYBOARDHARDWARE \ - "`KeyboardHardware` is deprecated, please use\n" __NL__ \ - "`Kaleidoscope.device()` instead" -#define _DEPRECATED_MESSAGE_HARDWARE_RESETDEVICE \ - "`KeyboardHardware.resetDevice()` is deprecated, please use " __NL__ \ - "`Kaleidoscope.rebootBootloader()` instead." - -#define _DEPRECATED_MESSAGE_ROWS \ - "The `ROWS` macro is deprecated, please use\n" __NL__ \ - "`Kaleidoscope.device().matrix_rows` instead." - -#define _DEPRECATED_MESSAGE_COLS \ - "The `COLS` macro is deprecated, please use \n" __NL__ \ - "`Kaleidoscope.device().matrix_columns` instead." - -#define _DEPRECATED_MESSAGE_LED_COUNT \ - "The `LED_COUNT` macro is deprecated, please use \n" __NL__ \ - "`Kaleidoscope.device().led_count` instead." - -#define _DEPRECATED_MESSAGE_HARDWARE_BASE_CLASS \ - "The `Hardware` base class is deprecated. Please use\n" __NL__ \ - "the new APIs based on `kaleidoscope::device::Base`." - #define _DEPRECATED_MESSAGE_DIRECT_KEY_MEMBER_ACCESS \ "Direct access to `Key` class' data members is deprecated.\n" \ "Please use `Key::setKeyCode()`/`Key::getKeyCode()` or\n" \ From e8c1a3bfb45543f24e1e206d4d880c24132ad297 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 16 Jun 2020 11:14:05 +0200 Subject: [PATCH 3/7] LEDControl: Remove the deprecated LEDControl::mode_add() method This has been deprecated in March, 2019, has been a no-op since. While no removal schedule was posted at the time, I believe it is safe to drop it now. Signed-off-by: Gergely Nagy --- docs/UPGRADING.md | 4 ++++ src/kaleidoscope/plugin/LEDControl.h | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md index c1692133..a5057ebd 100644 --- a/docs/UPGRADING.md +++ b/docs/UPGRADING.md @@ -570,6 +570,10 @@ The following headers and names have changed: After the introduction of the new device API, the old APIs (`ROWS`, `COLS`, `LED_COUNT`, `KeyboardHardware`, the old `Hardware` base class, etc) were removed on **2020-06-16**. +#### `LEDControl.mode_add()` + +Since March of 2019, this method has been deprecated, and turned into a no-op. While no removal date was posted at the time, after more than a year of deprecation, it has been removed on **2020-06-16**. + ### Removed on 2020-01-06 #### EEPROMKeymap mode diff --git a/src/kaleidoscope/plugin/LEDControl.h b/src/kaleidoscope/plugin/LEDControl.h index e416f1c8..3c99a1aa 100644 --- a/src/kaleidoscope/plugin/LEDControl.h +++ b/src/kaleidoscope/plugin/LEDControl.h @@ -25,11 +25,6 @@ #define Key_LEDEffectPrevious Key(1, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE) #define Key_LEDToggle Key(2, KEY_FLAGS | SYNTHETIC | IS_INTERNAL | LED_TOGGLE) -#define _DEPRECATED_MESSAGE_LED_CONTROL_MODE_ADD \ - "LEDControl::mode_add(LEDMode *mode) is deprecated. LEDModes are now \n" \ - "automatically registered. You can safely remove any calls to \n" \ - "LEDControl::mode_add from your code." - namespace kaleidoscope { namespace plugin { @@ -82,11 +77,6 @@ class LEDControl : public kaleidoscope::Plugin { cur_led_mode_->onActivate(); } - DEPRECATED(LED_CONTROL_MODE_ADD) - static int8_t mode_add(LEDMode *mode) { - return 0; - } - static void setCrgbAt(uint8_t led_index, cRGB crgb); static void setCrgbAt(KeyAddr key_addr, cRGB color); DEPRECATED(ROW_COL_FUNC) static void setCrgbAt(byte row, byte col, cRGB color) { From c800d2e4257e9403ba4ea3ad39baf43d5af76192 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 16 Jun 2020 11:29:54 +0200 Subject: [PATCH 4/7] Remove the deprecated `LEDControl.paused` property Signed-off-by: Gergely Nagy --- docs/UPGRADING.md | 76 ++++++++++++------------ src/kaleidoscope/plugin/LEDControl.h | 28 --------- src/kaleidoscope_internal/deprecations.h | 7 --- 3 files changed, 37 insertions(+), 74 deletions(-) diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md index a5057ebd..394cd8ab 100644 --- a/docs/UPGRADING.md +++ b/docs/UPGRADING.md @@ -13,7 +13,6 @@ If any of this does not make sense to you, or you have trouble updating your .in - [Consistent timing](#consistent-timing) + [Breaking changes](#breaking-changes) - [Implementation of type Key internally changed from C++ union to class](#implementation-of-type-key-internally-changed-from-union-to-class) - - [`LEDControl.paused` has been deprecated](#ledcontrolpaused-has-been-deprecated) - [The `RxCy` macros and peeking into the keyswitch state](#the-rxcy-macros-and-peeking-into-the-keyswitch-state) - [HostOS](#hostos) - [MagicCombo](#magiccombo) @@ -354,44 +353,6 @@ k.setKeyCode(Key_A.getKeyCode()); k.setFlags(Key_A.getFlags()); ``` -### `LEDControl.paused` has been deprecated - -Wherever we used `LEDControl.paused`, we'll need to use one of -`LEDControl.disable()`, `LEDControl.enable()`, or `LEDControl.isEnabled()` -instead. `LEDControl.paused` will still compile, but will emit deprecation -warnings, and will be removed after **2020-03-15**. - -Keep in mind that `.enable()` and `.disable()` do more than what `paused` did: -they will refresh and turn off LEDs too, respectively. - -A few examples to show how to transition to the new APIs follow, old use first, new second. - -```c++ -if (someCondition) { - LEDControl.set_all_leds_to({0, 0, 0}); - LEDControl.syncLeds(); - LEDControl.paused = true; -} else if (someOtherCondition) { - LEDControl.paused = false; - LEDControl.refreshAll(); -} - -if (LEDControl.paused) { - // do things... -} -``` - -```c++ -if (someCondition) { - LEDControl.disable(); -} else if (someOtherCondition) { - LEDControl.enable(); -} -if (!LEDControl.isEnabled()) { - // do things... -} -``` - ### The `RxCy` macros and peeking into the keyswitch state The `RxCy` macros changed from being indexes into a per-hand bitmap to being an @@ -574,6 +535,43 @@ After the introduction of the new device API, the old APIs (`ROWS`, `COLS`, `LED Since March of 2019, this method has been deprecated, and turned into a no-op. While no removal date was posted at the time, after more than a year of deprecation, it has been removed on **2020-06-16**. +#### `LEDControl.paused` + +Wherever we used `LEDControl.paused`, we'll need to use one of +`LEDControl.disable()`, `LEDControl.enable()`, or `LEDControl.isEnabled()` +instead. `LEDControl.paused` has been removed on **2020-06-16**. + +Keep in mind that `.enable()` and `.disable()` do more than what `paused` did: +they will refresh and turn off LEDs too, respectively. + +A few examples to show how to transition to the new APIs follow, old use first, new second. + +```c++ +if (someCondition) { + LEDControl.set_all_leds_to({0, 0, 0}); + LEDControl.syncLeds(); + LEDControl.paused = true; +} else if (someOtherCondition) { + LEDControl.paused = false; + LEDControl.refreshAll(); +} + +if (LEDControl.paused) { + // do things... +} +``` + +```c++ +if (someCondition) { + LEDControl.disable(); +} else if (someOtherCondition) { + LEDControl.enable(); +} +if (!LEDControl.isEnabled()) { + // do things... +} +``` + ### Removed on 2020-01-06 #### EEPROMKeymap mode diff --git a/src/kaleidoscope/plugin/LEDControl.h b/src/kaleidoscope/plugin/LEDControl.h index 3c99a1aa..3cf87682 100644 --- a/src/kaleidoscope/plugin/LEDControl.h +++ b/src/kaleidoscope/plugin/LEDControl.h @@ -117,34 +117,6 @@ class LEDControl : public kaleidoscope::Plugin { return Runtime.device().ledDriver().getBrightness(); } - // The data proxy objects are required to only emit deprecation - // messages when the `paused` property is accessed directly. - // - // Once the deprecation period elapsed, the proxy class and the proxied - // `paused` property can be safely removed. - class DataProxy { - public: - DataProxy() = default; - - //constexpr DataProxy(bool value) : value_{value} {} - - DEPRECATED(DIRECT_LEDCONTROL_PAUSED_ACCESS) - DataProxy &operator=(bool value) { - if (value) - disable(); - else - enable(); - return *this; - } - - DEPRECATED(DIRECT_LEDCONTROL_PAUSED_ACCESS) - operator bool () const { - return !isEnabled(); - } - }; - - DataProxy paused; - private: static uint16_t syncTimer; static uint8_t mode_id; diff --git a/src/kaleidoscope_internal/deprecations.h b/src/kaleidoscope_internal/deprecations.h index 190d4f52..7338d981 100644 --- a/src/kaleidoscope_internal/deprecations.h +++ b/src/kaleidoscope_internal/deprecations.h @@ -39,13 +39,6 @@ "For further information and examples on how to do that, \n" \ "please see UPGRADING.md." -#define _DEPRECATED_MESSAGE_DIRECT_LEDCONTROL_PAUSED_ACCESS \ - "Direct access to `LEDControl.paused` is deprecated.\n" \ - "Please use `LEDControl.disable()` and `LEDControl.enable()` instead.\n" \ - "\n" \ - "For further information and examples on how to do that, please see\n" \ - "UPGRADING.md" - #define _DEPRECATED_MESSAGE_KEY_MEMBER_RAW_ACCESS \ "The member variable `raw` of class Key had to be removed. Please \n" \ "use `Key::setRaw()`/`Key::getRaw()` to set and get raw data.\n" \ From cfe4bb3dcecdf4ffae0c83d8ab8c02a0698ee12b Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 16 Jun 2020 11:32:49 +0200 Subject: [PATCH 5/7] Remove the deprecated `Kaleidoscope_` class Signed-off-by: Gergely Nagy --- docs/UPGRADING.md | 16 ++++++++-------- src/Kaleidoscope.h | 6 ------ src/kaleidoscope_internal/deprecations.h | 8 -------- 3 files changed, 8 insertions(+), 22 deletions(-) diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md index 394cd8ab..2d7575d5 100644 --- a/docs/UPGRADING.md +++ b/docs/UPGRADING.md @@ -19,7 +19,6 @@ If any of this does not make sense to you, or you have trouble updating your .in - [TypingBreaks](#typingbreaks) - [Redial](#redial) + [Deprecated APIs and their replacements](#deprecated-apis-and-their-replacements) - - [Class/global instance Kaleidoscope_/Kaleidoscope renamed to kaleidoscope::Runtime_/kaleidoscope::Runtime](#classglobal-instance-kaleidoscope_kaleidoscope-renamed-to-kaleidoscoperuntime_kaleidoscoperuntime) - [Transition to linear indexing](#transition-to-linear-indexing) - [Source code and namespace rearrangement](#source-code-and-namespace-rearrangement) * [Removed APIs](#removed-apis) @@ -488,13 +487,6 @@ Older versions of the plugin required one to set up `Key_Redial` manually, and l ## Deprecated APIs and their replacements -### Class/global instance Kaleidoscope_/Kaleidoscope renamed to kaleidoscope::Runtime_/kaleidoscope::Runtime - -After the renaming, Kaleidoscope core should be using `kaleidoscope::Runtime`. -The former `Kaleidoscope` global symbol is to be used by sketches only - and -only because to not diverge too much from the Arduino naming style. Deprecated -symbols are scheduled for removal on **2020-03-15**. - ### Transition to linear indexing Row/col based indexing was replaced by linear indexing throughout the whole firmware. A compatibility layer of functions was introduced that allows @@ -572,6 +564,14 @@ if (!LEDControl.isEnabled()) { } ``` +#### Class/global instance Kaleidoscope_/Kaleidoscope renamed to kaleidoscope::Runtime_/kaleidoscope::Runtime + +After the renaming, Kaleidoscope core should be using `kaleidoscope::Runtime`. +The former `Kaleidoscope` global symbol is to be used by sketches only - and +only to not diverge too much from the Arduino naming style. + +The deprecated `Kaleidoscope_` class has been removed on **2020-06-16**. + ### Removed on 2020-01-06 #### EEPROMKeymap mode diff --git a/src/Kaleidoscope.h b/src/Kaleidoscope.h index 2b85b0b0..f366a8a4 100644 --- a/src/Kaleidoscope.h +++ b/src/Kaleidoscope.h @@ -105,12 +105,6 @@ static_assert(KALEIDOSCOPE_REQUIRED_API_VERSION == KALEIDOSCOPE_API_VERSION, // #define KALEIDOSCOPE_INIT_PLUGINS(...) _KALEIDOSCOPE_INIT_PLUGINS(__VA_ARGS__) -// For compatibility reasons we export class Runtime_ as Kaleidoscope_ -// in global namespace. -// -DEPRECATED(GLOBAL_TYPENAME_KALEIDOSCOPE) -typedef kaleidoscope::Runtime_ Kaleidoscope_; - // For compatibility/usability reasons we enable the global variable // Kaleidoscope in global namespace. // diff --git a/src/kaleidoscope_internal/deprecations.h b/src/kaleidoscope_internal/deprecations.h index 7338d981..7fd85174 100644 --- a/src/kaleidoscope_internal/deprecations.h +++ b/src/kaleidoscope_internal/deprecations.h @@ -48,11 +48,3 @@ "\n" \ "For further information and examples on how to do that, \n" \ "please see UPGRADING.md." - -#define _DEPRECATED_MESSAGE_GLOBAL_VARIABLE_KALEIDOSCOPE \ - "Variable `Kaleidoscope` in global namespace has been deprecated.\n" \ - "Please use `kaleidoscope::Runtime` instead." - -#define _DEPRECATED_MESSAGE_GLOBAL_TYPENAME_KALEIDOSCOPE \ - "Type `Kaleidoscope_` in global namespace has been deprecated.\n" \ - "Please use `kaleidoscope::Runtime_` instead." From f760431b2b01c3fc34e50b912783dd3929ceb844 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 16 Jun 2020 11:51:17 +0200 Subject: [PATCH 6/7] Remove the deprecated row/col-based indexing APIs They were originally scheduled for removal in March, lets drop them now. Signed-off-by: Gergely Nagy --- docs/UPGRADING.md | 16 ++-- src/kaleidoscope/MatrixAddr.h | 7 -- src/kaleidoscope/device/Base.h | 82 ------------------- src/kaleidoscope/event_handlers.h | 32 +------- src/kaleidoscope/hooks.h | 1 - src/kaleidoscope/key_events.cpp | 13 --- src/kaleidoscope/key_events.h | 12 --- src/kaleidoscope/layers.h | 23 ------ src/kaleidoscope/plugin/Colormap.h | 3 - src/kaleidoscope/plugin/EEPROM-Keymap.cpp | 10 --- src/kaleidoscope/plugin/EEPROM-Keymap.h | 7 -- src/kaleidoscope/plugin/FingerPainter.h | 3 - .../plugin/LED-ActiveLayerColor.h | 3 - src/kaleidoscope/plugin/LED-AlphaSquare.h | 28 ------- .../plugin/LED-AlphaSquare/Effect.h | 3 - src/kaleidoscope/plugin/LED-Palette-Theme.h | 3 - src/kaleidoscope/plugin/LEDControl.h | 9 -- src/kaleidoscope/plugin/LEDControl/LED-Off.h | 3 - .../plugin/LEDEffect-BootGreeting.h | 2 - .../plugin/LEDEffect-SolidColor.h | 3 - src/kaleidoscope/plugin/LEDMode.h | 14 ---- src/kaleidoscope/plugin/TapDance.cpp | 6 -- src/kaleidoscope/plugin/TapDance.h | 8 -- 23 files changed, 11 insertions(+), 280 deletions(-) diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md index 2d7575d5..d69566b7 100644 --- a/docs/UPGRADING.md +++ b/docs/UPGRADING.md @@ -19,7 +19,6 @@ If any of this does not make sense to you, or you have trouble updating your .in - [TypingBreaks](#typingbreaks) - [Redial](#redial) + [Deprecated APIs and their replacements](#deprecated-apis-and-their-replacements) - - [Transition to linear indexing](#transition-to-linear-indexing) - [Source code and namespace rearrangement](#source-code-and-namespace-rearrangement) * [Removed APIs](#removed-apis) @@ -487,13 +486,6 @@ Older versions of the plugin required one to set up `Key_Redial` manually, and l ## Deprecated APIs and their replacements -### Transition to linear indexing - -Row/col based indexing was replaced by linear indexing throughout the whole firmware. A compatibility layer of functions was introduced that allows -the firmware to remain backwards compatible, however, these functions are deprecated and will be removed in future versions of the firmware. - -Also a new version of the onKeyswitchEvent-handler has been introduced. The old version is deprecated, and will be removed after **2020-03-15**. - ### Source code and namespace rearrangement With the move towards a monorepo-based source, some headers have moved to a new location, and plenty of plugins moved to a new namespace (`kaleidoscope::plugin`). This means that the old headers, and some old names are deprecated. The old names no longer work. @@ -572,6 +564,14 @@ only to not diverge too much from the Arduino naming style. The deprecated `Kaleidoscope_` class has been removed on **2020-06-16**. +#### Transition to linear indexing + +Row/col based indexing was replaced by linear indexing throughout the whole firmware. A compatibility layer of functions was introduced that allows the firmware to remain backwards compatible, however, these functions are deprecated and will be removed in future versions of the firmware. + +Also a new version of the onKeyswitchEvent-handler has been introduced. + +The deprecated row/col based indexing APIs have been removed on **2020-06-16**. + ### Removed on 2020-01-06 #### EEPROMKeymap mode diff --git a/src/kaleidoscope/MatrixAddr.h b/src/kaleidoscope/MatrixAddr.h index f8012c35..350190fd 100644 --- a/src/kaleidoscope/MatrixAddr.h +++ b/src/kaleidoscope/MatrixAddr.h @@ -252,10 +252,3 @@ bool operator<=(const MatrixAddr1__ & a1, const MatrixAddr2__ & a2) { #endif } // end namespace kaleidoscope - -// Row/col based access functions have been superseded by matrix address -// base access. -// -#define _DEPRECATED_MESSAGE_ROW_COL_FUNC \ - "Row/col based access functions have been deprecated. Please use " \ - "the KeyAddr/KeyAddr based versions instead." diff --git a/src/kaleidoscope/device/Base.h b/src/kaleidoscope/device/Base.h index fb1eb868..295d4631 100644 --- a/src/kaleidoscope/device/Base.h +++ b/src/kaleidoscope/device/Base.h @@ -173,19 +173,6 @@ class Base { void setCrgbAt(KeyAddr key_addr, cRGB color) { setCrgbAt(getLedIndex(key_addr), color); } - /** - * Set the color of a per-key LED at a given row and column. - * - * Setting the color does not need to take effect immediately, it can be - * delayed until @ref syncLeds is called. - * - * @param row is the logical row position of the key. - * @param col is the logical column position of the key. - * @param color is the color to set the LED to. - */ - DEPRECATED(ROW_COL_FUNC) void setCrgbAt(byte row, byte col, cRGB color) { - setCrgbAt(KeyAddr(row, col), color); - } /** * Set the color of a per-key LED at a given LED index. * @@ -229,18 +216,6 @@ class Base { int8_t getLedIndex(KeyAddr key_addr) { return led_driver_.getLedIndex(key_addr.toInt()); } - /** - * Returns the index of the LED at a given row & column. - * - * @param row is the logical row position of the key. - * @param col is the logical column position of the key. - * - * @returns The index of the LED at the given position, or -1 if there are no - * LEDs there. - */ - DEPRECATED(ROW_COL_FUNC) int8_t getLedIndex(uint8_t row, byte col) { - return led_driver_.getLedIndex(KeyAddr(row, col)); - } /** @} */ /** @defgroup kaleidoscope_hardware_matrix Kaleidoscope::Hardware/Matrix @@ -295,18 +270,6 @@ class Base { void maskKey(KeyAddr key_addr) { key_scanner_.maskKey(key_addr); } - /** - * Mask out a key. - * - * Masking a key out means that any other event than a release will be - * ignored until said release. - * - * @param row is the row the key is located at in the matrix. - * @param col is the column the key is located at in the matrix. - */ - DEPRECATED(ROW_COL_FUNC) void maskKey(byte row, byte col) { - key_scanner_.maskKey(KeyAddr(row, col)); - } /** * Unmask a key. * @@ -318,18 +281,6 @@ class Base { void unMaskKey(KeyAddr key_addr) { key_scanner_.unMaskKey(key_addr); } - /** - * Unmask a key. - * - * Remove the mask - if any - for a given key. To be used when the mask - * needs to be removed without the key being released. - * - * @param row is the row the key is located at in the matrix. - * @param col is the column the key is located at in the matrix. - */ - DEPRECATED(ROW_COL_FUNC) void unMaskKey(byte row, byte col) { - key_scanner_.unMaskKey(KeyAddr(row, col)); - } /** * Check whether a key is masked or not. * @@ -340,17 +291,6 @@ class Base { bool isKeyMasked(KeyAddr key_addr) { return key_scanner_.isKeyMasked(key_addr); } - /** - * Check whether a key is masked or not. - * - * @param row is the row the key is located at in the matrix. - * @param col is the column the key is located at in the matrix. - * - * @returns true if the key is masked, false otherwise. - */ - DEPRECATED(ROW_COL_FUNC) bool isKeyMasked(byte row, byte col) { - return key_scanner_.isKeyMasked(KeyAddr(row, col)); - } /** @} */ /** @defgroup kaleidoscope_hardware_reattach Kaleidoscope::Hardware/Attach & Detach @@ -404,17 +344,6 @@ class Base { bool isKeyswitchPressed(KeyAddr key_addr) { return key_scanner_.isKeyswitchPressed(key_addr); } - /** - * Check if a key is pressed at a given position. - * - * @param row is the row the key is located at in the matrix. - * @param col is the column the key is located at in the matrix. - * - * @returns true if the key is pressed, false otherwise. - */ - DEPRECATED(ROW_COL_FUNC) bool isKeyswitchPressed(byte row, byte col) { - return key_scanner_.isKeyswitchPressed(KeyAddr(row, col)); - } /** * Check if a key is pressed at a given position. * @@ -446,17 +375,6 @@ class Base { bool wasKeyswitchPressed(KeyAddr key_addr) { return key_scanner_.wasKeyswitchPressed(key_addr); } - /** - * Check if a key was pressed at a given position on the previous scan - * - * @param row is the row the key is located at in the matrix. - * @param col is the column the key is located at in the matrix. - * - * @returns true if the key was pressed, false otherwise. - */ - DEPRECATED(ROW_COL_FUNC) bool wasKeyswitchPressed(byte row, byte col) { - return key_scanner_.wasKeyswitchPressed(KeyAddr(row, col)); - } /** * Check if a key was pressed at a given position on the previous scan. * diff --git a/src/kaleidoscope/event_handlers.h b/src/kaleidoscope/event_handlers.h index 6b13f4de..911b0727 100644 --- a/src/kaleidoscope/event_handlers.h +++ b/src/kaleidoscope/event_handlers.h @@ -103,15 +103,6 @@ // The list of parameters as they would be passed to a call to the handler. // Parameter names must match the names assigned to the call arguments. -#define _DEPRECATED_MESSAGE_ON_KEYSWITCH_EVENT_HANDLER_V1 \ -"The event handler signature\n" __NL__ \ -"EventHandlerResult onKeyswitchEvent(Key &mappedKey, byte row, byte col, \n" __NL__ \ -" uint8_t keyState)\n" __NL__ \ -"has been deprecated. Please use the new signature\n" __NL__ \ -"EventHandlerResult onKeyswitchEvent(Key &mappedKey, KeyAddr key_addr, \n" __NL__ \ -" uint8_t keyState)\n" __NL__ \ -"instead." - namespace kaleidoscope { // This dummy class can be used as dummy template argument to @@ -138,22 +129,6 @@ class SignatureCheckDummy {}; (),(),(), /* non template */ __NL__ \ (), (), ##__VA_ARGS__) __NL__ \ __NL__ \ - /* DEPRECATED */ __NL__ \ - /* Function called for every non-idle key, every cycle, so it */ __NL__ \ - /* can decide what to do with it. It can modify the key (which is */ __NL__ \ - /* passed by reference for this reason), and decide whether */ __NL__ \ - /* further handles should be tried. If it returns */ __NL__ \ - /* EventHandlerResult::OK, other handlers will also get a chance */ __NL__ \ - /* to react to the event. If it returns anything else, Kaleidoscope */ __NL__ \ - /* will stop processing there. */ __NL__ \ - OPERATION(onKeyswitchEvent, __NL__ \ - 1, __NL__ \ - DEPRECATED(ON_KEYSWITCH_EVENT_HANDLER_V1), __NL__ \ - _ABORTABLE, __NL__ \ - (),(),(), /* non template */ __NL__ \ - (Key &mappedKey, byte row, byte col, uint8_t keyState), __NL__ \ - (mappedKey, row, col, keyState), ##__VA_ARGS__) __NL__ \ - __NL__ \ /* Function called for every non-idle key, every cycle, so it */ __NL__ \ /* can decide what to do with it. It can modify the key (which is */ __NL__ \ /* passed by reference for this reason), and decide whether */ __NL__ \ @@ -162,7 +137,7 @@ class SignatureCheckDummy {}; /* to react to the event. If it returns anything else, Kaleidoscope */ __NL__ \ /* will stop processing there. */ __NL__ \ OPERATION(onKeyswitchEvent, __NL__ \ - 2, __NL__ \ + 1, __NL__ \ _CURRENT_IMPLEMENTATION, __NL__ \ _ABORTABLE, __NL__ \ (),(),(), /* non template */ __NL__ \ @@ -262,10 +237,9 @@ class SignatureCheckDummy {}; OP(beforeEachCycle, 1) __NL__ \ END(beforeEachCycle, 1) __NL__ \ __NL__ \ - START(onKeyswitchEvent, 1, 2) __NL__ \ + START(onKeyswitchEvent, 1) __NL__ \ OP(onKeyswitchEvent, 1) __NL__ \ - OP(onKeyswitchEvent, 2) __NL__ \ - END(onKeyswitchEvent, 1, 2) __NL__ \ + END(onKeyswitchEvent, 1) __NL__ \ __NL__ \ START(onFocusEvent, 1) __NL__ \ OP(onFocusEvent, 1) __NL__ \ diff --git a/src/kaleidoscope/hooks.h b/src/kaleidoscope/hooks.h index 04de8eaa..5d63cddc 100644 --- a/src/kaleidoscope/hooks.h +++ b/src/kaleidoscope/hooks.h @@ -30,7 +30,6 @@ class Key; // in class Hooks. class kaleidoscope_; extern void handleKeyswitchEvent(kaleidoscope::Key mappedKey, KeyAddr key_addr, uint8_t keyState); -DEPRECATED(ROW_COL_FUNC) extern void handleKeyswitchEvent(kaleidoscope::Key mappedKey, byte row, byte col, uint8_t keyState); namespace kaleidoscope { namespace plugin { diff --git a/src/kaleidoscope/key_events.cpp b/src/kaleidoscope/key_events.cpp index 3302f6e9..b9344573 100644 --- a/src/kaleidoscope/key_events.cpp +++ b/src/kaleidoscope/key_events.cpp @@ -123,22 +123,9 @@ void handleKeyswitchEvent(Key mappedKey, KeyAddr key_addr, uint8_t keyState) { // Keypresses with out-of-bounds key_addr start here in the processing chain - // We call both versions of onKeyswitchEvent. This assumes that a plugin - // implements either the old or the new version of the hook. - // The call to that version that is not implemented is optimized out - // by the caller. This is possible as the call would fall back to - // the version of the hook that is implemented in the base class of the - // plugin. This fallback version is an empty inline noop method that - // is simple for the compiler to optimize out. - - // New event handler interface version 2 (key address version) if (kaleidoscope::Hooks::onKeyswitchEvent(mappedKey, key_addr, keyState) != kaleidoscope::EventHandlerResult::OK) return; - // New event handler interface (deprecated version) - if (kaleidoscope::Hooks::onKeyswitchEvent(mappedKey, key_addr.row(), key_addr.col(), keyState) != kaleidoscope::EventHandlerResult::OK) - return; - mappedKey = Layer.eventHandler(mappedKey, key_addr, keyState); if (mappedKey == Key_NoKey) return; diff --git a/src/kaleidoscope/key_events.h b/src/kaleidoscope/key_events.h index d1acdc40..45d7ca8e 100644 --- a/src/kaleidoscope/key_events.h +++ b/src/kaleidoscope/key_events.h @@ -23,15 +23,6 @@ #include "kaleidoscope/keyswitch_state.h" #include "kaleidoscope/KeyAddr.h" - -// Code can use this macro on injected key events to signal that -// the event isn't tied to a specific physical keyswitch -// -// TODO DEPRECATED(ROW_COL_FUNC): Once row/col based key/LED access -// is deprecated, deprecate UNKNOWN_KEYSWITCH_LOCATION as well. -// -#define UNKNOWN_KEYSWITCH_LOCATION 255,255 - // UnknownKeyswitchLocation represents an invalid (as default constructed) // key address. Note: This is not a constexpr as it turned out // that the compiler would instanciate it and store it in RAM if @@ -75,6 +66,3 @@ * injected, and is not a direct result of a keypress, coming from the scanner. */ void handleKeyswitchEvent(Key mappedKey, kaleidoscope::Device::Props::KeyScannerProps::KeyAddr key_addr, uint8_t keyState); -DEPRECATED(ROW_COL_FUNC) inline void handleKeyswitchEvent(Key mappedKey, byte row, byte col, uint8_t keyState) { - handleKeyswitchEvent(mappedKey, KeyAddr(row, col), keyState); -} diff --git a/src/kaleidoscope/layers.h b/src/kaleidoscope/layers.h index 3236cff8..a9047127 100644 --- a/src/kaleidoscope/layers.h +++ b/src/kaleidoscope/layers.h @@ -74,24 +74,13 @@ class Layer_ { static Key lookup(KeyAddr key_addr) { return live_composite_keymap_[key_addr.toInt()]; } - DEPRECATED(ROW_COL_FUNC) static Key lookup(byte row, byte col) { - return live_composite_keymap_[KeyAddr(row, col).toInt()]; - } static Key lookupOnActiveLayer(KeyAddr key_addr) { uint8_t layer = active_layers_[key_addr.toInt()]; return (*getKey)(layer, key_addr); } - DEPRECATED(ROW_COL_FUNC) static Key lookupOnActiveLayer(byte row, byte col) { - KeyAddr key_addr(row, col); - uint8_t layer = active_layers_[key_addr.toInt()]; - return (*getKey)(layer, key_addr); - } static uint8_t lookupActiveLayer(KeyAddr key_addr) { return active_layers_[key_addr.toInt()]; } - DEPRECATED(ROW_COL_FUNC) static uint8_t lookupActiveLayer(byte row, byte col) { - return active_layers_[KeyAddr(row, col).toInt()]; - } static void activate(uint8_t layer); static void deactivate(uint8_t layer); @@ -109,28 +98,16 @@ class Layer_ { } static Key eventHandler(Key mappedKey, KeyAddr key_addr, uint8_t keyState); - DEPRECATED(ROW_COL_FUNC) static Key eventHandler(Key mappedKey, byte row, byte col, uint8_t keyState) { - return eventHandler(mappedKey, KeyAddr(row, col), keyState); - } typedef Key(*GetKeyFunction)(uint8_t layer, KeyAddr key_addr); static GetKeyFunction getKey; static Key getKeyFromPROGMEM(uint8_t layer, KeyAddr key_addr); - DEPRECATED(ROW_COL_FUNC) static Key getKeyFromPROGMEM(uint8_t layer, byte row, byte col) { - return getKeyFromPROGMEM(layer, KeyAddr(row, col)); - } static void updateLiveCompositeKeymap(KeyAddr key_addr, Key mappedKey) { live_composite_keymap_[key_addr.toInt()] = mappedKey; } - DEPRECATED(ROW_COL_FUNC) static void updateLiveCompositeKeymap(byte row, byte col, Key mappedKey) { - updateLiveCompositeKeymap(KeyAddr(row, col), mappedKey); - } static void updateLiveCompositeKeymap(KeyAddr key_addr); - DEPRECATED(ROW_COL_FUNC) static void updateLiveCompositeKeymap(byte row, byte col) { - updateLiveCompositeKeymap(KeyAddr(row, col)); - } static void updateActiveLayers(void); private: diff --git a/src/kaleidoscope/plugin/Colormap.h b/src/kaleidoscope/plugin/Colormap.h index 4259c31d..0ee38399 100644 --- a/src/kaleidoscope/plugin/Colormap.h +++ b/src/kaleidoscope/plugin/Colormap.h @@ -50,9 +50,6 @@ class ColormapEffect : public Plugin, virtual void onActivate(void) final; virtual void refreshAt(KeyAddr key_addr) final; - DEPRECATED(ROW_COL_FUNC) void refreshAt(byte row, byte col) final { - refreshAt(KeyAddr(row, col)); - } private: const ColormapEffect *parent_; diff --git a/src/kaleidoscope/plugin/EEPROM-Keymap.cpp b/src/kaleidoscope/plugin/EEPROM-Keymap.cpp index e55a3f33..5241db53 100644 --- a/src/kaleidoscope/plugin/EEPROM-Keymap.cpp +++ b/src/kaleidoscope/plugin/EEPROM-Keymap.cpp @@ -88,16 +88,6 @@ void EEPROMKeymap::dumpKeymap(uint8_t layers, Key(*getkey)(uint8_t, KeyAddr)) { } } -void EEPROMKeymap::dumpKeymap(uint8_t layers, Key(*getkey)(uint8_t, byte, byte)) { - for (uint8_t layer = 0; layer < layers; layer++) { - for (auto key_addr : KeyAddr::all()) { - Key k = (*getkey)(layer, key_addr.row(), key_addr.col()); - - ::Focus.send(k); - } - } -} - EventHandlerResult EEPROMKeymap::onFocusEvent(const char *command) { if (::Focus.handleHelp(command, PSTR("keymap.custom\nkeymap.default\nkeymap.onlyCustom"))) return EventHandlerResult::OK; diff --git a/src/kaleidoscope/plugin/EEPROM-Keymap.h b/src/kaleidoscope/plugin/EEPROM-Keymap.h index 838c07a6..7447865e 100644 --- a/src/kaleidoscope/plugin/EEPROM-Keymap.h +++ b/src/kaleidoscope/plugin/EEPROM-Keymap.h @@ -41,13 +41,7 @@ class EEPROMKeymap : public kaleidoscope::Plugin { static uint16_t keymap_base(void); static Key getKey(uint8_t layer, KeyAddr key_addr); - DEPRECATED(ROW_COL_FUNC) static Key getKey(uint8_t layer, byte row, byte col) { - return getKey(layer, KeyAddr(row, col)); - } static Key getKeyExtended(uint8_t layer, KeyAddr key_addr); - DEPRECATED(ROW_COL_FUNC) static Key getKeyExtended(uint8_t layer, byte row, byte col) { - return getKeyExtended(layer, KeyAddr(row, col)); - } static void updateKey(uint16_t base_pos, Key key); @@ -59,7 +53,6 @@ class EEPROMKeymap : public kaleidoscope::Plugin { static Key parseKey(void); static void printKey(Key key); static void dumpKeymap(uint8_t layers, Key(*getkey)(uint8_t, KeyAddr)); - DEPRECATED(ROW_COL_FUNC) static void dumpKeymap(uint8_t layers, Key(*getkey)(uint8_t, byte, byte)); }; } } diff --git a/src/kaleidoscope/plugin/FingerPainter.h b/src/kaleidoscope/plugin/FingerPainter.h index 1caf4d03..e8c90bad 100644 --- a/src/kaleidoscope/plugin/FingerPainter.h +++ b/src/kaleidoscope/plugin/FingerPainter.h @@ -39,9 +39,6 @@ class FingerPainter : public LEDMode { protected: void update(void) final; void refreshAt(KeyAddr key_addr) final; - DEPRECATED(ROW_COL_FUNC) void refreshAt(byte row, byte col) final { - refreshAt(KeyAddr(row, col)); - } private: static uint16_t color_base_; diff --git a/src/kaleidoscope/plugin/LED-ActiveLayerColor.h b/src/kaleidoscope/plugin/LED-ActiveLayerColor.h index 0ee80de9..b5363131 100644 --- a/src/kaleidoscope/plugin/LED-ActiveLayerColor.h +++ b/src/kaleidoscope/plugin/LED-ActiveLayerColor.h @@ -45,9 +45,6 @@ class LEDActiveLayerColorEffect : public Plugin, virtual void onActivate(void) final; virtual void refreshAt(KeyAddr key_addr) final; - DEPRECATED(ROW_COL_FUNC) void refreshAt(byte row, byte col) final { - refreshAt(KeyAddr(row, col)); - } private: diff --git a/src/kaleidoscope/plugin/LED-AlphaSquare.h b/src/kaleidoscope/plugin/LED-AlphaSquare.h index 6852b7e1..fbcdedc7 100644 --- a/src/kaleidoscope/plugin/LED-AlphaSquare.h +++ b/src/kaleidoscope/plugin/LED-AlphaSquare.h @@ -39,13 +39,7 @@ class AlphaSquare : public kaleidoscope::Plugin { AlphaSquare(void) {} static void display(Key key, KeyAddr key_addr, cRGB key_color); - DEPRECATED(ROW_COL_FUNC) static void display(Key key, uint8_t row, uint8_t col, cRGB key_color) { - display(key, KeyAddr(row, col), key_color); - } static void display(Key key, KeyAddr key_addr); - DEPRECATED(ROW_COL_FUNC) static void display(Key key, uint8_t row, uint8_t col) { - display(key, KeyAddr(row, col)); - } static void display(Key key) { display(key, KeyAddr(0, 2)); } @@ -54,13 +48,7 @@ class AlphaSquare : public kaleidoscope::Plugin { } static void display(uint16_t symbol, KeyAddr key_addr, cRGB key_color); - DEPRECATED(ROW_COL_FUNC) static void display(uint16_t symbol, uint8_t row, uint8_t col, cRGB key_color) { - display(symbol, KeyAddr(row, col), key_color); - } static void display(uint16_t symbol, KeyAddr key_addr); - DEPRECATED(ROW_COL_FUNC) static void display(uint16_t symbol, uint8_t row, uint8_t col) { - display(symbol, KeyAddr(row, col)); - } static void display(uint16_t symbol) { display(symbol, KeyAddr(0, 2)); } @@ -71,9 +59,6 @@ class AlphaSquare : public kaleidoscope::Plugin { static void clear(Key key, KeyAddr key_addr) { display(key, key_addr, {0, 0, 0}); } - DEPRECATED(ROW_COL_FUNC) static void clear(Key key, uint8_t row, uint8_t col) { - clear(key, KeyAddr(row, col)); - } static void clear(Key key, uint8_t col) { clear(key, KeyAddr(0, col)); } @@ -84,9 +69,6 @@ class AlphaSquare : public kaleidoscope::Plugin { static void clear(uint16_t symbol, KeyAddr key_addr) { display(symbol, key_addr, {0, 0, 0}); } - DEPRECATED(ROW_COL_FUNC) static void clear(uint16_t symbol, uint8_t row, uint8_t col) { - clear(symbol, KeyAddr(row, col)); - } static void clear(uint16_t symbol, uint8_t col) { clear(symbol, KeyAddr(0, col)); } @@ -97,19 +79,9 @@ class AlphaSquare : public kaleidoscope::Plugin { static bool isSymbolPart(Key key, KeyAddr displayLedAddr, KeyAddr key_addr); - DEPRECATED(ROW_COL_FUNC) static bool isSymbolPart(Key key, - uint8_t display_row, uint8_t display_col, - uint8_t row, uint8_t col) { - return isSymbolPart(key, KeyAddr(display_row, display_col), KeyAddr(row, col)); - } static bool isSymbolPart(uint16_t symbol, KeyAddr displayLedAddr, KeyAddr key_addr); - DEPRECATED(ROW_COL_FUNC) static bool isSymbolPart(uint16_t symbol, - uint8_t display_row, uint8_t display_col, - uint8_t row, uint8_t col) { - return isSymbolPart(symbol, KeyAddr(display_row, display_col), KeyAddr(row, col)); - } static cRGB color; }; diff --git a/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.h b/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.h index 2a60507d..73eeae77 100644 --- a/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.h +++ b/src/kaleidoscope/plugin/LED-AlphaSquare/Effect.h @@ -41,9 +41,6 @@ class AlphaSquareEffect : public Plugin, protected: void update(void) final; void refreshAt(KeyAddr key_addr) final; - DEPRECATED(ROW_COL_FUNC) void refreshAt(byte row, byte col) final { - refreshAt(KeyAddr(row, col)); - } private: uint16_t start_time_left_, start_time_right_; diff --git a/src/kaleidoscope/plugin/LED-Palette-Theme.h b/src/kaleidoscope/plugin/LED-Palette-Theme.h index 54f45c45..1d10c993 100644 --- a/src/kaleidoscope/plugin/LED-Palette-Theme.h +++ b/src/kaleidoscope/plugin/LED-Palette-Theme.h @@ -30,9 +30,6 @@ class LEDPaletteTheme : public kaleidoscope::Plugin { static uint16_t reserveThemes(uint8_t max_themes); static void updateHandler(uint16_t theme_base, uint8_t theme); static void refreshAt(uint16_t theme_base, uint8_t theme, KeyAddr key_addr); - DEPRECATED(ROW_COL_FUNC) static void refreshAt(uint16_t theme_base, uint8_t theme, byte row, byte col) { - refreshAt(theme_base, theme, KeyAddr(row, col)); - } static const uint8_t lookupColorIndexAtPosition(uint16_t theme_base, uint16_t position); static const cRGB lookupColorAtPosition(uint16_t theme_base, uint16_t position); diff --git a/src/kaleidoscope/plugin/LEDControl.h b/src/kaleidoscope/plugin/LEDControl.h index 3cf87682..8b59833b 100644 --- a/src/kaleidoscope/plugin/LEDControl.h +++ b/src/kaleidoscope/plugin/LEDControl.h @@ -61,9 +61,6 @@ class LEDControl : public kaleidoscope::Plugin { return static_cast(cur_led_mode_); } - DEPRECATED(ROW_COL_FUNC) static void refreshAt(byte row, byte col) { - refreshAt(KeyAddr(row, col)); - } static void refreshAll() { if (!Runtime.has_leds) @@ -79,14 +76,8 @@ class LEDControl : public kaleidoscope::Plugin { static void setCrgbAt(uint8_t led_index, cRGB crgb); static void setCrgbAt(KeyAddr key_addr, cRGB color); - DEPRECATED(ROW_COL_FUNC) static void setCrgbAt(byte row, byte col, cRGB color) { - setCrgbAt(KeyAddr(row, col), color); - } static cRGB getCrgbAt(uint8_t led_index); static cRGB getCrgbAt(KeyAddr key_addr); - DEPRECATED(ROW_COL_FUNC) static cRGB getCrgbAt(byte row, byte col) { - return getCrgbAt(KeyAddr(row, col)); - } static void syncLeds(void); static void set_all_leds_to(uint8_t r, uint8_t g, uint8_t b); diff --git a/src/kaleidoscope/plugin/LEDControl/LED-Off.h b/src/kaleidoscope/plugin/LEDControl/LED-Off.h index fae240bd..3acfffad 100644 --- a/src/kaleidoscope/plugin/LEDControl/LED-Off.h +++ b/src/kaleidoscope/plugin/LEDControl/LED-Off.h @@ -31,9 +31,6 @@ class LEDOff : public LEDMode { protected: void onActivate(void) final; void refreshAt(KeyAddr key_addr) final; - DEPRECATED(ROW_COL_FUNC) void refreshAt(byte row, byte col) final { - refreshAt(KeyAddr(row, col)); - } }; } } diff --git a/src/kaleidoscope/plugin/LEDEffect-BootGreeting.h b/src/kaleidoscope/plugin/LEDEffect-BootGreeting.h index 562a941c..180d244c 100644 --- a/src/kaleidoscope/plugin/LEDEffect-BootGreeting.h +++ b/src/kaleidoscope/plugin/LEDEffect-BootGreeting.h @@ -25,8 +25,6 @@ class BootGreetingEffect : public kaleidoscope::Plugin { public: BootGreetingEffect(void) {} BootGreetingEffect(KeyAddr key_addr); - DEPRECATED(ROW_COL_FUNC) BootGreetingEffect(byte row, byte col) - : BootGreetingEffect(KeyAddr(row, col)) {} static KeyAddr user_key_addr; static Key search_key; diff --git a/src/kaleidoscope/plugin/LEDEffect-SolidColor.h b/src/kaleidoscope/plugin/LEDEffect-SolidColor.h index 0cfaf374..2678b2fb 100644 --- a/src/kaleidoscope/plugin/LEDEffect-SolidColor.h +++ b/src/kaleidoscope/plugin/LEDEffect-SolidColor.h @@ -43,9 +43,6 @@ class LEDSolidColor : public Plugin, protected: virtual void onActivate(void) final; virtual void refreshAt(KeyAddr key_addr) final; - DEPRECATED(ROW_COL_FUNC) virtual void refreshAt(byte row, byte col) final { - refreshAt(KeyAddr(row, col)); - } private: diff --git a/src/kaleidoscope/plugin/LEDMode.h b/src/kaleidoscope/plugin/LEDMode.h index 1a67e8cb..e8678018 100644 --- a/src/kaleidoscope/plugin/LEDMode.h +++ b/src/kaleidoscope/plugin/LEDMode.h @@ -92,20 +92,6 @@ class LEDMode : public kaleidoscope::Plugin, */ virtual void refreshAt(KeyAddr key_addr) {} - /** Refresh the color of a given key. - * - * If we have another plugin that overrides colors set by the active LED mode - * (either at @onActivate time, or via @ref update), if that plugin wants to - * restore whatever color the mode would set the key color to, this is the - * method it will call. - * - * @param row is the row coordinate of the key to refresh the color of. - * @param col is the column coordinate of the key to refresh the color of. - */ - DEPRECATED(ROW_COL_FUNC) virtual void refreshAt(byte row, byte col) { - refreshAt(KeyAddr(row, col)); - } - public: /** Plugin initialization. diff --git a/src/kaleidoscope/plugin/TapDance.cpp b/src/kaleidoscope/plugin/TapDance.cpp index 5d9ad72c..f844859c 100644 --- a/src/kaleidoscope/plugin/TapDance.cpp +++ b/src/kaleidoscope/plugin/TapDance.cpp @@ -202,14 +202,8 @@ EventHandlerResult TapDance::afterEachCycle() { } } -__attribute__((weak)) void tapDanceAction(uint8_t tap_dance_index, byte row, byte col, uint8_t tap_count, - kaleidoscope::plugin::TapDance::ActionType tap_dance_action) { -} - -// Let the future version be the wrapper to enable backward compatibility. __attribute__((weak)) void tapDanceAction(uint8_t tap_dance_index, KeyAddr key_addr, uint8_t tap_count, kaleidoscope::plugin::TapDance::ActionType tap_dance_action) { - tapDanceAction(tap_dance_index, key_addr.row(), key_addr.col(), tap_count, tap_dance_action); } kaleidoscope::plugin::TapDance TapDance; diff --git a/src/kaleidoscope/plugin/TapDance.h b/src/kaleidoscope/plugin/TapDance.h index 3e4592f2..d0e6cb5e 100644 --- a/src/kaleidoscope/plugin/TapDance.h +++ b/src/kaleidoscope/plugin/TapDance.h @@ -75,12 +75,4 @@ class TapDance : public kaleidoscope::Plugin { void tapDanceAction(uint8_t tap_dance_index, KeyAddr key_addr, uint8_t tap_count, kaleidoscope::plugin::TapDance::ActionType tap_dance_action); -// The old version of te tapdance action is DEPRECATED(ROW_COL_FUNC) although this -// cannot be flagged to the user. The weak function is called by the tap dance -// plugin's implementation. That's why the deprecation warning would always -// fire. -// -void tapDanceAction(uint8_t tap_dance_index, byte row, byte col, uint8_t tap_count, - kaleidoscope::plugin::TapDance::ActionType tap_dance_action); - extern kaleidoscope::plugin::TapDance TapDance; From 54331c1ed94c619f1182514fc5038d4d8cb28423 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 16 Jun 2020 11:59:40 +0200 Subject: [PATCH 7/7] docs/UPGRADING.md: Breaking changes update Add a removal date for the removal of the `Key` property direct access, and also document the deprecation of the HID facade, with the same removal date of the old APIs. Signed-off-by: Gergely Nagy --- docs/UPGRADING.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/UPGRADING.md b/docs/UPGRADING.md index d69566b7..a4d8e813 100644 --- a/docs/UPGRADING.md +++ b/docs/UPGRADING.md @@ -12,6 +12,7 @@ If any of this does not make sense to you, or you have trouble updating your .in - [Bidirectional communication for plugins](#bidirectional-communication-for-plugins) - [Consistent timing](#consistent-timing) + [Breaking changes](#breaking-changes) + - [Deprecation of the HID facade](#deprecation-of-the-hid-facade) - [Implementation of type Key internally changed from C++ union to class](#implementation-of-type-key-internally-changed-from-union-to-class) - [The `RxCy` macros and peeking into the keyswitch state](#the-rxcy-macros-and-peeking-into-the-keyswitch-state) - [HostOS](#hostos) @@ -312,8 +313,14 @@ As a developer, one can continue using `millis()`, but migrating to `Kaleidoscop ## Breaking changes +### Deprecation of the HID facade + +With the new Device APIs it became possible to replace the HID facade (the `kaleidoscope::hid` family of functions) with a driver. As such, the old APIs are deprecated, and will be removed by **2020-09-16**. Please use `Kaleidoscope.hid()` instead. + ### Implementation of type Key internally changed from C++ union to class +The deprecated functions continue to work, but they will be removed by **2020-09-16**. + #### For end-users This is a breaking change only if your code accesses the member `raw` of