1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-13 13:09:49 +04:00

upd nfc maker / badusb fixes

by @Willy-JL
This commit is contained in:
MX
2023-07-11 13:40:46 +03:00
parent 9d98724dcb
commit bc0722fe25
3 changed files with 209 additions and 181 deletions

View File

@@ -257,8 +257,12 @@ static int32_t ducky_parse_line(BadBtScript* bad_bt, FuriString* line) {
}
if((key & 0xFF00) != 0) {
// It's a modifier key
line_tmp = &line_tmp[ducky_get_command_len(line_tmp) + 1];
key |= ducky_get_keycode(bad_bt, line_tmp, true);
uint32_t offset = ducky_get_command_len(line_tmp) + 1;
// ducky_get_command_len() returns 0 without space, so check for != 1
if(offset != 1 && line_len > offset) {
// It's also a key combination
key |= ducky_get_keycode(bad_bt, line_tmp + offset, true);
}
}
furi_hal_bt_hid_kb_press(key);
furi_delay_ms(bt_timeout);