diff --git a/applications/main/bad_kb/helpers/ducky_script.c b/applications/main/bad_kb/helpers/ducky_script.c index 8f45b5e1f..45eb35c01 100644 --- a/applications/main/bad_kb/helpers/ducky_script.c +++ b/applications/main/bad_kb/helpers/ducky_script.c @@ -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);