added keycode

This commit is contained in:
Matthias Fulz 2022-07-26 01:46:33 +02:00
parent c54765e246
commit 8161c72c75
2 changed files with 9 additions and 0 deletions

View File

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

View File

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