# InsomniaEXE

**A simple program to avoid Windows from being idle by sending keyboard events continuously.**

## How to use it
Simply execute `insomnia.exe`, and by default, the program simulates the left Windows key every 60 seconds. You can change the intervals by providing the argument:
```dos
insomnia.exe <number of seconds>
```

## How to cross-compile the Windows executable on Linux (Red Hat, Fedora)
```bash
sudo dnf install mingw32-gcc mingw32-gcc-c++ cmake
cd insomnia
mkdir build
cd build
mingw32-cmake ..
make
```

## Technical reference
- [SendInput function (winuser.h) - Win32 apps | Microsoft Learn](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput)

## ChangeLog

20230518:
 - Simulate the Windows key twice every time.

20230419:
 - The first release.

#### Author: DarkRanger (https://darkranger.no-ip.org)
#### License: MIT License