微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在arduino中按WINDOWS + R?

如何解决如何在arduino中按WINDOWS + R?

我想用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() {}

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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。