arduino - 如何在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
解决方案
推荐阅读
- wix - Wix Toolkit 3.11 util 命名空间在构建时无法加载
- python - 如何访问嵌套字典的内部值
- c# - 无法使用 C# 在 selenium 浏览器中单击
- java - JNI:converting jstring(full of number) into jint using Integer.pasteInt by jvmti导致Crash
- sql - 尝试在nestjs中创建用户时,用户名中没有默认值
- node.js - 有没有更简单的方法将 javascript 对象转换为 dynamodb 更新表达式?
- angular - 内部化 Angular 10 @angular/localize,$localize 不起作用
- c++ - 如何使用 libc++ 用 clang 编译 Google Benchmark
- javascript - 在角度 10 中找不到 videogular2
- flutter - 将firebase添加到项目后地图不起作用