@@ -34,7 +34,7 @@ enum DuckyCommandType {
3434 DuckyCommandType_DefaultStringDelay
3535};
3636
37- struct DuckyCommand {
37+ struct DuckyCommandLookup {
3838 const char *command;
3939 char key;
4040 DuckyCommandType type;
@@ -62,7 +62,7 @@ const DuckyCombination duckyComb[]{
6262 {" SYSREQ" , KEY_LEFT_ALT, KEY_PRINT_SCREEN, 0 }
6363};
6464
65- const DuckyCommand duckyCmds[]{
65+ const DuckyCommandLookup duckyCmds[]{
6666 {" REM" , 0 , DuckyCommandType_Comment },
6767 {" //" , 0 , DuckyCommandType_Comment },
6868 {" STRING" , 0 , DuckyCommandType_Print },
@@ -634,8 +634,8 @@ void key_input(FS fs, String bad_script, HIDInterface *_hid) {
634634 uint16_t i;
635635 uint16_t repeatCount = RepeatTmp.toInt ();
636636 for (i = 0 ; i < repeatCount; i++) {
637- DuckyCommand *PriCmd = findDuckyCommand (Cmd);
638- DuckyCommand *ArgCmd = findDuckyCommand (Argument.c_str ());
637+ DuckyCommandLookup *PriCmd = findDuckyCommand (Cmd);
638+ DuckyCommandLookup *ArgCmd = findDuckyCommand (Argument.c_str ());
639639
640640 if (PriCmd != nullptr ) {
641641 // REM comment lines are processed here
@@ -986,9 +986,9 @@ void MediaCommands(HIDInterface *hid, bool ble) {
986986 returnToMenu = true ;
987987}
988988
989- DuckyCommand *findDuckyCommand (const char *cmd) {
989+ DuckyCommandLookup *findDuckyCommand (const char *cmd) {
990990 for (auto &cmds : duckyCmds) {
991- if (strcmp (cmd, cmds.command ) == 0 ) { return const_cast <DuckyCommand *>(&cmds); }
991+ if (strcmp (cmd, cmds.command ) == 0 ) { return const_cast <DuckyCommandLookup *>(&cmds); }
992992 }
993993 return nullptr ;
994994}
0 commit comments