Found one here...posting it for the benefit of others. I had to set a HotKey and then it works beautifully.
https://github.com/stirtingale/Alfred---Toggle-Function-Keys-On-Of
is there an update to this as of now? the download link to the original workflow is not working. Would be grateful if someone can post a workflow that works with current MacOS version
Thanks a lot for this pointer to Python. I was able to get my custom search to work. However, I had to use Python2.
How do I make this work with Python3?