im using arduino pro micro (clone) and i uploaded my code and its working fine, but when as default keyboard language is not english, my program is useless, how can i make my arduino change keyboard language automaticly? (sorry for my bad english if there is something wrong )
#include <Keyboard.h>
// Init function
void setup()
{
pinMode(3, INPUT_PULLUP);
if (digitalRead(3) == LOW){
while(1);
}
Keyboard.begin();
delay(500);
delay(3000);
Keyboard.press(KEY_LEFT_GUI);
Keyboard.print("r");
Keyboard.releaseAll();
delay(500);
Keyboard.print("cmd");
delay(500);
typeKey(KEY_RETURN);
delay(1000);
Keyboard.print("cd Desktop");
typeKey(KEY_RETURN);
Keyboard.releaseAll();
delay(500);
Keyboard.print("type nul > hahaha.bat");
typeKey(KEY_RETURN);
Keyboard.releaseAll();
delay(500);
Keyboard.print("notepad hahaha.bat");
typeKey(KEY_RETURN);
Keyboard.releaseAll();
delay(1000);
Keyboard.print("@echo off \necho Hello world!");
Keyboard.press(KEY_LEFT_CTRL);
Keyboard.print("s");
Keyboard.releaseAll();
delay(750);
Keyboard.releaseAll();
Keyboard.press(KEY_LEFT_ALT);
Keyboard.press(KEY_F4);
Keyboard.releaseAll();
typeKey(KEY_RETURN);
Keyboard.print("hahaha.bat");
typeKey(KEY_RETURN);
Keyboard.releaseAll();
Keyboard.end();
}
void typeKey(int key)
{
Keyboard.press(key);
delay(50);
Keyboard.release(key);
}
// Unused
void loop() {}