Added support for APPEND_CR.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2023-03-30 00:52:08 +02:00
parent 26ac66e813
commit 3d1c68fa40
No known key found for this signature in database
GPG Key ID: C0095B7870A4CCD3
2 changed files with 7 additions and 1 deletions

@ -1 +1 @@
Subproject commit ef0fb29f2919477231d125c245ec6d4be7e49fac
Subproject commit 630da663c4bef29d938f238d77016a9c84ddae6d

View File

@ -176,12 +176,18 @@ int otp_button_pressed(uint8_t slot) {
flash_write_data_to_file(ef, new_otp_config, sizeof(new_otp_config));
low_flash_available();
}
if (otp_config->tkt_flags & APPEND_CR) {
append_keyboard_buffer((const uint8_t *)"\r", 1);
}
}
else if (otp_config->cfg_flags & SHORT_TICKET || otp_config->cfg_flags & STATIC_TICKET) {
if (otp_config->cfg_flags & SHORT_TICKET) {
otp_config->fixed_size /= 2;
}
add_keyboard_buffer(otp_config->fixed_data, otp_config->fixed_size, false);
if (otp_config->tkt_flags & APPEND_CR) {
append_keyboard_buffer((const uint8_t *)"\x28", 1);
}
}
else {