From 8333dab7ce57a34c276777706e137f1cc31aa842 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Tue, 16 Jun 2020 11:09:41 +0200 Subject: [PATCH] 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" \