Arduino 如何按WINDOWS+;在阿杜伊诺?

Arduino 如何按WINDOWS+;在阿杜伊诺?,arduino,arduino-ide,payload,Arduino,Arduino Ide,Payload,我想用arduino写些东西,但它无法打开WINDOWS+R。 我写了这段代码: #include <Keyboard.h> // Utility function void typeKey(int key){ Keyboard.press(key); delay(50); Keyboard.release(key); } void setup() { // Start Keyboard and Mouse Keyboard.begin(); // Start Payload

我想用arduino写些东西,但它无法打开WINDOWS+R。 我写了这段代码:

#include <Keyboard.h>

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

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

// Start Payload
// Happy Holidays By Ghostshell

Keyboard.press(KEY_RIGHT_GUI);
Keyboard.press('r');
Keyboard.releaseAll();

delay(1000);

Keyboard.print("notepad.exe");

typeKey(KEY_RETURN);

delay(1000);

Keyboard.print("         _");

typeKey(KEY_RETURN);

Keyboard.print("      |\\ 0 /|");

typeKey(KEY_RETURN);

Keyboard.print("       |/|\\|");

typeKey(KEY_RETURN);

Keyboard.print("         |");

typeKey(KEY_RETURN);

Keyboard.print("         @");

typeKey(KEY_RETURN);

Keyboard.print("        /+\\");

typeKey(KEY_RETURN);

Keyboard.print("       o/@\\\\");

typeKey(KEY_RETURN);

Keyboard.print("     +//o/\\\\o");

typeKey(KEY_RETURN);

Keyboard.print("     //+/@\\\\/+o");

typeKey(KEY_RETURN);

Keyboard.print("    /\\/o//+/\\\\\\\\");

typeKey(KEY_RETURN);

Keyboard.print("   +///\\//\\o\\o+\\\\o");

typeKey(KEY_RETURN);

Keyboard.print("  o/+@/++/\\\\\\@\\\\/\\+");

typeKey(KEY_RETURN);

Keyboard.print(" /\\/+///o/@\\o+/\\+\\\\");

typeKey(KEY_RETURN);

Keyboard.print("o/+/\\/@//||\\/\\\\o\\\\\\o _");

typeKey(KEY_RETURN);

Keyboard.print(" /__ /|  ||      /__ /|");

typeKey(KEY_RETURN);

Keyboard.print("| * | | (__)___ | * | |");

typeKey(KEY_RETURN);

Keyboard.print("|___|/_   /__ /||___|/");

typeKey(KEY_RETURN);

Keyboard.print("    /_/| | * | |");

typeKey(KEY_RETURN);

Keyboard.print("   |_|/  |___|/");

typeKey(KEY_RETURN);

Keyboard.print("     `-.____/");

typeKey(KEY_RETURN);

typeKey(KEY_RETURN);

Keyboard.print("It was the");

typeKey(KEY_RETURN);

Keyboard.print("Night");

typeKey(KEY_RETURN);

Keyboard.print("before");

typeKey(KEY_RETURN);

Keyboard.print("Christmas...");

typeKey(KEY_RETURN);

Keyboard.print("And All Through");

typeKey(KEY_RETURN);

Keyboard.print("The House....");

typeKey(KEY_RETURN);

Keyboard.print("Not A Creature Was");

typeKey(KEY_RETURN);

Keyboard.print("Sturring...");

typeKey(KEY_RETURN);

Keyboard.print("Not Even");

typeKey(KEY_RETURN);

Keyboard.print("A Mouse");

typeKey(KEY_RETURN);

typeKey(KEY_RETURN);

Keyboard.print("Happy Holidays To All!!");



typeKey(KEY_RETURN);

  typeKey(KEY_RETURN);

  Keyboard.print("From");

  typeKey(KEY_RETURN);

  typeKey(KEY_RETURN);

  Keyboard.print("Cheers!!");

  typeKey(KEY_RETURN);

  delay(100);

  // End Payload

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

// Unused
void loop() {}
#包括
//效用函数
无效类型键(int键){
键盘。按(键);
延迟(50);
键盘。释放(键);
}
无效设置()
{
//启动键盘和鼠标
键盘。开始();
//启动有效载荷
//鬼壳欢乐假日酒店
键盘。按(右键\u GUI);
键盘。按('r');
键盘。释放全部();
延迟(1000);
打印(“notepad.exe”);
类型键(返回键);
延迟(1000);
键盘打印(“”);
类型键(返回键);
键盘。打印(“|\\0/|”);
类型键(返回键);
键盘。打印(“|/|\\\\\”);
类型键(返回键);
键盘。打印(“|”);
类型键(返回键);
键盘。打印(“@”);
类型键(返回键);
键盘打印(“/+\\”);
类型键(返回键);
键盘。打印(“o/@\\\”;
类型键(返回键);
键盘打印(“+//o/\\\o”);
类型键(返回键);
键盘打印(“/+/@\\\/+o”);
类型键(返回键);
键盘。打印(“/\/o/+/+/\”;
类型键(返回键);
键盘打印(“+//\/\\o\\o+\\\o”);
类型键(返回键);
打印(“o/++/++/\\\\\\\\\\\\\\\\+”;
类型键(返回键);
键盘。打印(“/\/+/+//o/@\\o++/\\+\\\”;
类型键(返回键);
键盘。打印(“o/+/\/@/\\\/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\;
类型键(返回键);
键盘。打印(“/uuu/| | | |/uuu/|”);
类型键(返回键);
键盘。打印(“|*| |(|)| |*| |”);
类型键(返回键);
键盘。打印(“| | | |/|/|/| | |/”;
类型键(返回键);
键盘。打印(“/_/| | |*| |”);
类型键(返回键);
键盘。打印(“| | |/| |/”;
类型键(返回键);
键盘打印(“`-.\\\\\\\\/”;
类型键(返回键);
类型键(返回键);
键盘。打印(“它是最重要的”);
类型键(返回键);
键盘。打印(“夜晚”);
类型键(返回键);
键盘。打印(“之前”);
类型键(返回键);
键盘。打印(“圣诞节…”);
类型键(返回键);
键盘。打印(“和全部”);
类型键(返回键);
键盘。打印(“房子…”);
类型键(返回键);
键盘。打印(“不是生物”);
类型键(返回键);
键盘。打印(“Sturring…”);
类型键(返回键);
键盘。打印(“不均匀”);
类型键(返回键);
键盘。打印(“鼠标”);
类型键(返回键);
类型键(返回键);
打印(“祝大家节日快乐!!”;
类型键(返回键);
类型键(返回键);
键盘。打印(“从”);
类型键(返回键);
类型键(返回键);
键盘。打印(“干杯!!”;
类型键(返回键);
延迟(100);
//末端有效载荷
//停止键盘和鼠标
键盘。结束();
}
//未使用
void loop(){}

当我在记事本已经打开的情况下运行此代码时,它可以工作,但无法在键盘上打开WINDOWS+R

,WINDOWS键在左边。如果改用
KEY\u LEFT\u GUI
会怎么样?我尝试过KEY\u LEFT\u GUI,但它不能根据和工作,似乎KEY\u LEFT\u GUI应该是正确的按键。如果只使用
键盘,按(键\u LEFT\u GUI)
,而不按自己的typeKey()函数,会发生什么?