From 7cbff9d921879ef3c54837cb2ffc455e019f45b4 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sat, 22 Oct 2022 01:46:10 +1100 Subject: Deprecate `KC_LOCK` for `QK_LOCK` (#18796) --- quantum/process_keycode/process_key_lock.c | 8 ++++---- quantum/quantum_keycodes.h | 2 +- quantum/quantum_keycodes_legacy.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'quantum') diff --git a/quantum/process_keycode/process_key_lock.c b/quantum/process_keycode/process_key_lock.c index 941a2c5780..2542e32ec2 100644 --- a/quantum/process_keycode/process_key_lock.c +++ b/quantum/process_keycode/process_key_lock.c @@ -70,7 +70,7 @@ bool process_key_lock(uint16_t *keycode, keyrecord_t *record) { // reset the state in our map and return false. When the user releases the // key, the up event will no longer be masked and the OS will observe the // released key. - // 3. KC_LOCK was just pressed. In this case, we set up the state machine + // 3. QK_LOCK was just pressed. In this case, we set up the state machine // to watch for the next key down event, and finish processing // 4. The keycode is below 0xFF, and we are watching for new keys. In this case, // we will send the key down event to the os, and set the key_state for that @@ -95,20 +95,20 @@ bool process_key_lock(uint16_t *keycode, keyrecord_t *record) { if (record->event.pressed) { // Non-standard keycode, reset and return - if (!(IS_STANDARD_KEYCODE(translated_keycode) || translated_keycode == KC_LOCK)) { + if (!(IS_STANDARD_KEYCODE(translated_keycode) || translated_keycode == QK_LOCK)) { watching = false; return true; } // If we're already watching, turn off the watch. - if (translated_keycode == KC_LOCK) { + if (translated_keycode == QK_LOCK) { watching = !watching; return false; } if (IS_STANDARD_KEYCODE(translated_keycode)) { // We check watching first. This is so that in the following scenario, we continue to - // hold the key: KC_LOCK, KC_F, KC_LOCK, KC_F + // hold the key: QK_LOCK, KC_F, QK_LOCK, KC_F // If we checked in reverse order, we'd end up holding the key pressed after the second // KC_F press is registered, when the user likely meant to hold F if (watching) { diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index f9268c833d..57dbfa0509 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -471,7 +471,7 @@ enum quantum_keycodes { OUT_BT, // 5D2A // Lock Key - KC_LOCK, // 5D2B + QK_LOCK, // 5D2B // Unused slots UNUSED_000, // 5D2C diff --git a/quantum/quantum_keycodes_legacy.h b/quantum/quantum_keycodes_legacy.h index 73c486492f..6a847f71a6 100644 --- a/quantum/quantum_keycodes_legacy.h +++ b/quantum/quantum_keycodes_legacy.h @@ -3,8 +3,8 @@ // clang-format off // Deprecated Quantum keycodes - #define KC_LEAD QK_LEADER +#define KC_LOCK QK_LOCK #define TERM_ON _Static_assert(false, "The Terminal feature has been removed from QMK. Please remove use of TERM_ON/TERM_OFF from your keymap.") #define TERM_OFF _Static_assert(false, "The Terminal feature has been removed from QMK.. Please remove use of TERM_ON/TERM_OFF from your keymap.") -- cgit v1.2.3