I have a new app idea and there are two parts I don't know how to build yet. I hope someone can point me in the right directions. I need to respond on certain keys even if my app doesn't have the focus. For example: I'm now using Firefox and if I press cmd I wan't my app to respond. Second part is that I want the app to stay in the background, so after pressing cmd a function in my app should be called, but as user I want to continue in Firefox without even noticing it. I'm not building a key logger, but I do want to use it's functionalities. Does someone know a guide for either of these parts? I haven't found any.