Access highlighted text anywhere in electron


Is there a way I can access(read) a highlighted text in or out of my electron app, for processing. eg say I want to find the meaning of a word. I just highlight and use a key combo that will then trigger my dictionary app to give the meaning of the selected text.


This and this might be some resources for you!