Merge pull request #853 from keyboardio/deprecations/removal-2020-june

Deprecations & removals, 2020 June
pull/854/head
Jesse Vincent 4 years ago committed by GitHub
commit 7d60ddfd28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -12,16 +12,14 @@ 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)
- [`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)
- [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)
@ -41,7 +39,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
@ -315,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
@ -354,44 +358,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
@ -527,20 +493,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
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.
@ -564,13 +516,76 @@ 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**.
#### `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**.
#### `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...
}
```
#### 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**.
#### 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
#### 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 +593,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:

@ -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"
@ -111,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.
//

@ -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 <http://www.gnu.org/licenses/>.
*/
/** @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<typename T_>
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

@ -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."

@ -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.
*
@ -510,15 +428,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.
*/

@ -232,7 +232,5 @@ uint8_t ErgoDox::pressedKeyswitchCount() {
}
}
kaleidoscope::device::ez::ErgoDox &ErgoDox = kaleidoscope_internal::device;
#endif
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD

@ -143,6 +143,4 @@ EXPORT_DEVICE(kaleidoscope::device::ez::ErgoDox)
}
extern kaleidoscope::device::ez::ErgoDox DEPRECATED(NAMED_HARDWARE) &ErgoDox;
#endif

@ -33,7 +33,5 @@ ATMEGA_KEYSCANNER_BOILERPLATE
}
}
kaleidoscope::device::kbdfans::KBD4x &KBD4x = kaleidoscope_internal::device;
#endif
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD

@ -72,6 +72,4 @@ EXPORT_DEVICE(kaleidoscope::device::kbdfans::KBD4x)
}
extern kaleidoscope::device::kbdfans::KBD4x DEPRECATED(NAMED_HARDWARE) &KBD4x;
#endif

@ -32,7 +32,5 @@ ATMEGA_KEYSCANNER_BOILERPLATE
}
}
kaleidoscope::device::keyboardio::Atreus &Atreus = kaleidoscope_internal::device;
#endif
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD

@ -68,6 +68,4 @@ EXPORT_DEVICE(kaleidoscope::device::keyboardio::Atreus)
}
extern kaleidoscope::device::keyboardio::Atreus DEPRECATED(NAMED_HARDWARE) &Atreus;
#endif

@ -31,7 +31,5 @@ ATMEGA_KEYSCANNER_BOILERPLATE
}
}
kaleidoscope::device::olkb::Planck &Planck = kaleidoscope_internal::device;
#endif
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD

@ -52,6 +52,4 @@ EXPORT_DEVICE(kaleidoscope::device::olkb::Planck)
}
extern kaleidoscope::device::olkb::Planck DEPRECATED(NAMED_HARDWARE) &Planck;
#endif

@ -38,7 +38,5 @@ ATMEGA_KEYSCANNER_BOILERPLATE
}
}
kaleidoscope::device::softhruf::Splitography &Splitography = kaleidoscope_internal::device;
#endif
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD

@ -96,6 +96,4 @@ EXPORT_DEVICE(kaleidoscope::device::softhruf::Splitography)
}
extern kaleidoscope::device::softhruf::Splitography DEPRECATED(NAMED_HARDWARE) &Splitography;
#endif

@ -40,7 +40,5 @@ ATMEGA_KEYSCANNER_BOILERPLATE
}
}
kaleidoscope::device::technomancy::Atreus &Atreus = kaleidoscope_internal::device;
#endif
#endif // ifndef KALEIDOSCOPE_VIRTUAL_BUILD

@ -85,6 +85,4 @@ EXPORT_DEVICE(kaleidoscope::device::technomancy::Atreus)
}
extern kaleidoscope::device::technomancy::Atreus DEPRECATED(NAMED_HARDWARE) &Atreus;
#endif

@ -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__ \

@ -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 {

@ -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;

@ -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);
}

@ -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:

@ -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_;

@ -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;

@ -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));
};
}
}

@ -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_;

@ -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:

@ -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;
};

@ -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_;

@ -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);

@ -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 {
@ -66,9 +61,6 @@ class LEDControl : public kaleidoscope::Plugin {
return static_cast<LEDMode__*>(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)
@ -82,21 +74,10 @@ 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) {
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);
@ -127,34 +108,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;

@ -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));
}
};
}
}

@ -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;

@ -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:

@ -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.

@ -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;

@ -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;

@ -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" \
@ -66,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" \
@ -82,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."

Loading…
Cancel
Save