I've attached to this post a script with incomplete capabilities.
It works as expected, but can't define keys like "shift", "ctrl" or "alt" to mouse clicks.
To do so, just edit the .ini file that is created after the first launch, and change the "Hotkey" key.
(to have just ctrl, type in "ctrl", to have shift, type "shift", to have "alt", type "alt", to have windows key, type "lwin" or "rwin").
To change the hotkey, delete the .ini file and restart the script.