mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
BadKB fix using only modifier keys by themselves
This commit is contained in:
@@ -294,8 +294,12 @@ static int32_t ducky_parse_line(BadKbScript* bad_kb, 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_kb, 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_kb, line_tmp + offset, true);
|
||||
}
|
||||
}
|
||||
if(bad_kb->bt) {
|
||||
furi_hal_bt_hid_kb_press(key);
|
||||
|
||||
Reference in New Issue
Block a user