From 75ffaf3cc89ae368261282b65c713dd1dcdfc5b9 Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Mon, 7 Jun 2021 15:57:49 -0500 Subject: [PATCH] Add removal dates for deprecated core functions Signed-off-by: Michael Richters --- src/kaleidoscope_internal/deprecations.h | 48 ++++++++++++++---------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/src/kaleidoscope_internal/deprecations.h b/src/kaleidoscope_internal/deprecations.h index c3b8b8c1..10e26e3e 100644 --- a/src/kaleidoscope_internal/deprecations.h +++ b/src/kaleidoscope_internal/deprecations.h @@ -27,39 +27,45 @@ /* Messages */ -#define _DEPRECATED_MESSAGE_LAYER_UPDATELIVECOMPOSITEKEYMAP __NL__ \ - "`Layer.updateLiveCompositeKeymap()` is deprecated.\n" __NL__ \ - "The 'live composite keymap' cache has been replaced with the\n" __NL__ \ - "'active keys' cache, which now represents the state of the active\n" __NL__ \ - "keys at any given time. It is probably not necessary to directly\n" __NL__ \ - "update that cache from a plugin, but if you need to, please use\n" __NL__ \ - "the `live_keys.activate(key_addr, key)` function instead." +#define _DEPRECATED_MESSAGE_LAYER_UPDATELIVECOMPOSITEKEYMAP __NL__ \ + "`Layer.updateLiveCompositeKeymap()` is deprecated.\n" __NL__ \ + "The 'live composite keymap' cache has been replaced with the\n" __NL__ \ + "'active keys' cache, which now represents the state of the active\n" __NL__ \ + "keys at any given time. It is probably not necessary to directly\n" __NL__ \ + "update that cache from a plugin, but if you need to, please use\n" __NL__ \ + "the `live_keys.activate(key_addr, key)` function instead.\n" __NL__ \ + "This function will be removed after 2021-08-01." -#define _DEPRECATED_MESSAGE_LAYER_EVENTHANDLER __NL__ \ - "`Layer.eventHandler()` is deprecated.\n" __NL__ \ - "Please use `Layer.handleKeymapKeyswitchEvent()` instead." +#define _DEPRECATED_MESSAGE_LAYER_EVENTHANDLER __NL__ \ + "`Layer.eventHandler()` is deprecated.\n" __NL__ \ + "Please use `Layer.handleKeymapKeyswitchEvent()` instead.\n" __NL__ \ + "This function will be removed after 2021-08-01." -#define _DEPRECATED_MESSAGE_LAYER_HANDLE_KEYMAP_KEYSWITCH_EVENT __NL__ \ - "`Layer.handleKeymapKeyswitchEvent()` is deprecated.\n" __NL__ \ - "Please use `Layer.handleLayerKeyEvent()` instead." +#define _DEPRECATED_MESSAGE_LAYER_HANDLE_KEYMAP_KEYSWITCH_EVENT __NL__ \ + "`Layer.handleKeymapKeyswitchEvent()` is deprecated.\n" __NL__ \ + "Please use `Layer.handleLayerKeyEvent()` instead.\n" __NL__ \ + "This function will be removed after 2021-08-01." #define _DEPRECATED_MESSAGE_LAYER_LOOKUP __NL__ \ "`Layer.lookup(key_addr)` is deprecated.\n" __NL__ \ "Please use `Runtime.lookupKey(key_addr)` instead. Alternatively, if you\n" __NL__ \ "need to look up the current keymap entry without regard to current live\n" __NL__ \ "key state(s) (i.e. the `live_keys` array, which normally overrides the\n" __NL__ \ - "keymap), you can use `Layer.lookupOnActiveLayer(key_addr)`." + "keymap), you can use `Layer.lookupOnActiveLayer(key_addr)`.\n" __NL__ \ + "This function will be removed after 2021-08-01." -#define _DEPRECATED_MESSAGE_HANDLE_KEYSWITCH_EVENT __NL__ \ - "`handleKeyswitchEvent()` has been deprecated.\n" __NL__ \ - "Please use `Runtime.handleKeyEvent()` instead." +#define _DEPRECATED_MESSAGE_HANDLE_KEYSWITCH_EVENT __NL__ \ + "`handleKeyswitchEvent()` has been deprecated.\n" __NL__ \ + "Please use `Runtime.handleKeyEvent()` instead.\n" __NL__ \ + "This function will be removed after 2021-08-01." #define _DEPRECATED_MESSAGE_ON_KEYSWITCH_EVENT_V1 __NL__ \ "The `onKeyswitchEvent()` event handler is deprecated.\n" __NL__ \ "Please replace it with an `onKeyEvent()` handler. See the documentation\n" __NL__ \ "in UPGRADING.md and docs/api-reference/event-handler-hooks.md for more\n" __NL__ \ "information on what changes are needed to adapt old plugins to the new\n" __NL__ \ - "event handler API." + "event handler API.\n" __NL__ \ + "This function will be removed after 2021-08-01." #define _DEPRECATED_MESSAGE_BEFORE_REPORTING_STATE_V1 __NL__ \ "This `beforeReportingState()` event handler version is deprecated.\n" __NL__ \ @@ -68,11 +74,13 @@ "report is sent. However, the new handler does not run every cycle, but\n" __NL__ \ "only in response to key events. If you have code that is intended to run\n" __NL__ \ "every scan cycle, it should be moved to the `afterEachCycle()` event\n" __NL__ \ - "handler instead." + "handler instead.\n" __NL__ \ + "This function will be removed after 2021-08-01." #define _DEPRECATED_MESSAGE_HID_KEYBOARD_PRESSKEY_TOGGLEDON __NL__ \ "The `Keyboard::pressKey(key, toggled_on)` function is deprecated.\n" __NL__ \ "Please use `Keyboard::pressKey(key)` without the second argument\n" __NL__ \ "instead. The version with two arguments handled rollover events, and\n" __NL__ \ "this is now handled more completely by the event handling functions in\n" __NL__ \ - "`Runtime`." + "`Runtime`.\n" __NL__ \ + "This function will be removed after 2021-08-01."