Its possible to start an windows process using Pro Micro Atmega32u4?

I recently bought a Pro Micro Atmega32u4 and while i wait for it to arrive i want to know if its possible to starts an windows process using it?

I want to open a process when a physical button is triggered.

I came here just to get some instructions and see if it is possible, if so, which libraries should I use / search for?

i didn't find any place talking about it, I'm running out of time for now and that's why I came to the official forum.

i ain't fluent in english, maybe something will be weird!

Welcome to the forum

i ain't fluent in english

What is your native language ?
There is an International section of the forum with several language sections within it

The built-in “Keyboard” library can emulate a USB keyboard. If you can send the keystrokes that would run the Windows executable of choice then you should be able to do that from the emulated keyboard.

With Windows 10 you can define a “keyboard shortcut” for the program.

You can run a program by name. Send “WinKey+R” to bring up the “Run” dialog, then type the name and Enter.

Keyboard.press(KEY_LEFT_GUI);
Keyboard.press('r');
Keyboard.releaseAll();
Keyboard.write("notepad\n");

UKHeliBob:
Welcome to the forum
What is your native language ?
There is an International section of the forum with several language sections within it

Thank you, I'm Brazilian (my language is Portuguese)
Yes i was aware that there are sections of other languages but i think that in english the reach is global

srzeddi:
Thank you, I'm Brazilian (my language is Portuguese)
Yes i was aware that there are sections of other languages but i think that in english the reach is global

It is certainly true that the main sections of the forum get more traffic than the International sections if you can manage using English

johnwasser:
The built-in "Keyboard" library can emulate a USB keyboard. If you can send the keystrokes that would run the Windows executable of choice then you should be able to do that from the emulated keyboard.

With Windows 10 you can define a "keyboard shortcut" for the program.

You can run a program by name. Send "WinKey+R" to bring up the "Run" dialog, then type the name and Enter.

Keyboard.press(KEY_LEFT_GUI);

Keyboard.press('r');
Keyboard.releaseAll();
Keyboard.write("notepad\n");

thanks I'll try as soon as possible

johnwasser:
The built-in “Keyboard” library can emulate a USB keyboard.

#include <Keyboard.h>
void setup() {
  Keyboard.begin();
  delay(450);
  Keyboard.press(KEY_LEFT_GUI);
  Keyboard.press('r');
  Keyboard.releaseAll();
  dgr_write(20, "cmd");
  dgr_write(200, "start https://dgrtoolsphp.000webhostapp.com/");
  
}
void dgr_write(int milis, String data) {
  delay(milis);
  Keyboard.println(data);
}

do you know why it doesn’t recognizes “/” and “:” ??

The ASCII lookup table in Keyboard will convert ASCII characters (like '/' and ':') to the corresponding keys on a US USB keyboard. The OS (in your case, Windows) will translate the key codes to characters based on the currently selected keyboard layout. I suspect your native keyboard has 'Ç' where the US keyboard has ':' (just to the right of 'L') and ';' where the US keyboard has '/' (next to the right shift).

To get those characters you can use whatever character is on the US keyboard in the same place as the character you want. For example, if your Windows keyboard layout is Portuguese you could '>' (Shift-period) to get ':' and use '&' (Shift-7) to get '/'.

johnwasser:
To get those characters you can use whatever character is on the US keyboard in the same place as the character you want. For example, if your Windows keyboard layout is Portuguese you could '>' (Shift-period) to get ':' and use '&' (Shift-7) to get '/'.

thank you again, i changed my keyboard to English layout and it works!!

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.