1 minute read

Wakey is a Python program to help keep a computer screen active by pressing a virtual key on a timer. It keeps the computer awake by simulating a F15 keyboard press and release.

Default key press is currently 1 minute. There are arguments to change the frequency as well.

Currently tested on Windows 10 and Ubuntu 20.10 (Groovy Gorilla), but no reason it should not work on other operating systems that have Python 3.6+ installed.


To setup and start using Wakey, just download the Latest Release and then install the dependencies.

pip install -r requirements.txt

You can install this in a virtual environment as well, which is what I’d prefer. To get started run…

pip install virtualenv
virtualenv .
pip install -r requirements.txt
python wakey.py


Wakey has a few arguments you can use to adjust the settings.

Command Explanation
-f, –frequency Used for the frequency of the keypress in minutes. Default is 1 minute.
-v, –verbose To see the output of the keypress in the console. Default is false.
-l, –log Create a log of the application to see when the events happened. Default is false


Wakey will run with no arguments given and use the default settings. On windows this is the F15 key and every 1 minute. On Linux we need to run wakey.py as a root user. To avoid depending on X, the Linux parts reads raw device files (/dev/input/input*) but this requires root. Part of the known limitations for the keyboard module.

On Linux Wakey uses the shift key and on Windows Wakey uses the function 15 key (F15).


This will run Wakey with a keypress every 2 minutes showing the output to the screen and create log file

python wakey.py -f 2 -v -l

The log file will be created in the same directory as Wakey.


You can compile Wakey to an executable (tested on Windows 10). There is the built in build.bat file which uses pyinstaller

pyinstaller --onefile --icon=sun.ico --version-file=version.txt wakey.py

This step has already been done for you and you can find the compiled version here.