There is several ways to make this work, but the easiest one I found is just using the default tools provided by Ubuntu.
So, lets say we want to send a user defined signal to a Unix process in our machine to do some specific task asynchronously, that is, when we press the keyboard shortcut. In Windows systems probably we would need to trap events to do something similar.
To do that just go to System - Preferences - keyboard shortcuts and add your command.
In this particular case we want to add:
bash -c -i "kill -USR1 $(pgrep -f your_proccess_name.py)"
Take into account that first we specify the Unix interpreter to be used and then the command.
Kill is sending our user defined signal to our python script, and from that python script we will capture and handle the signal.

