Source:
#include<Windows.h>
#include<conio.h>
int main() {
char stop = static_cast<char>(getch());
while (stop != 's') { // 'S' needs to be WIN+S
keybd_event(VK_LWIN, 0x5b, 0, 0); // Press WIN KEY
keybd_event(VK_LEFT, '0x25', 0, 0); // Press LEFT KEY
keybd_event(VK_LEFT, '0x25', KEYEVENTF_KEYUP, 0); // Lift LEFT KEY
}
keybd_event(VK_LEFT, '0x25', KEYEVENTF_KEYUP, 0); // Lift WIN KEY
return 0;
}
At: while (stop != 's')
I wanna change the 's' to the key combination of: WIN+S
course ass you can see, the loop is going to hold down the WIN key all the time.
Or if anyone have another way to stop the loop maybe.