Arduino (Making Bad USB) "Enter" command doesn't work

Hi, im currently just messing around with making a USB Rubber ducky, using Arduino Pro Micro.

IDE works, its set up and it runs the scripts, however, it does not press enter for example when using Duckino to convert the ducky script into Arduino, which is supposed to (Open run, ----> Enter a website link which it will open, it will enter the script but not press the enter key so it doesn't open it. This is a case for other Ducky scripts such as disabling windows defender, it will type of the setting in the search bar but not enter the thing it's written.. Here is an example of a simple script that wouldn't work.

#include <HID-Project.h>
#include <HID-Settings.h>

// Utility function
void typeKey(int key){
Keyboard.press(key);
delay(50);
Keyboard.release(key);
}

void setup()
{
// Start Keyboard and Mouse
AbsoluteMouse.begin();
Keyboard.begin();

// Start Payload
delay(3000);

Keyboard.press(KEY_LEFT_GUI);
Keyboard.press(114);
Keyboard.releaseAll();

delay(200);

Keyboard.print("[Mod edit suspect link removed]");

typeKey(KEY_ENTER);

delay(3000);

Keyboard.print("f");

// End Payload

// Stop Keyboard and Mouse
Keyboard.end();
AbsoluteMouse.end();
}

// Unused
void loop() {}

Any ideas thanks :slight_smile:

@anon2548989
I have removed from your post a suspicious link embedded in the text. Please refrain from posting anything like that again.

I'm not even sure we should be helping you with something that could be used to bypass the security on a PC.

Thank you.

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

Your post was MOVED to its current location as it is more suitable

Expect no help with this project from me

Hi everyone, this is just educational of course, I'm just interested in USB Rubber duckys, and decided to create one. The link that was included was just to open a YouTube rickroll lol, I was just going through payloads on Hak5 used for the ducky. Sorry for the post, but no bad intentions are there, just educational.

However moving to the problem not pressing enter, upon further inspection, I realised for "enter to work" it also has to be Keyboard.press (Enter) not typeKey(KEY_ENTER). Not sure why most payloads have all that.