diff --git a/quantum/enc/enc.c b/quantum/enc/enc.c index c078880d78..4be7ccc7ec 100644 --- a/quantum/enc/enc.c +++ b/quantum/enc/enc.c @@ -205,6 +205,7 @@ void enc_switch_mode(uint8_t mode) { enc_clear_ctx(); break; case ENC_MODE_INIT: + case ENC_MODE_KEY: enc_ctx.mode.sub_mode = ENC_SUB_MODE_SEED; break; } @@ -1121,6 +1122,13 @@ bool process_record_enc(uint16_t keycode, keyrecord_t *record) { } return false; break; + case ENC_KEY: + if (record->event.pressed) { + enc_clear_ctx(); + enc_switch_mode(ENC_MODE_KEY); + } + return false; + break; case ENC_PASTE: if (record->event.pressed) { if (!enc_request.data.data) { diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 452fe75df2..05655fa547 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -614,6 +614,7 @@ enum quantum_keycodes { ENC_RESET, ENC_REQ_ALLOW, ENC_REQ_DENY, + ENC_KEY, #endif // Start of custom keycode range for keyboards and keymaps - always leave at the end