added backspace for keys

This commit is contained in:
Matthias Fulz 2022-07-26 09:22:03 +02:00
parent c7d78a05f3
commit 3a52e1819e
1 changed files with 6 additions and 0 deletions

View File

@ -967,6 +967,12 @@ int enc_read_key(uint16_t keycode) {
case KC_9:
enc_ctx.state.key[enc_ctx.state.key_size] = '9';
break;
case KC_BSPC:
enc_ctx.state.key_size--;
if (enc_ctx.state.key_size < 0) {
enc_ctx.state.key_size = 0;
}
return 0;
default:
return -1;