Detect keypresses without consol or GUI
I want to make a bot for someone that will monitor a chatroom and bans any newcommers. All of the bots that I've made before have been fine having a limited number of loops -- if they got out of hand, then I'd just let them run their course until the loop expired.
This one I want to run for an untold amount of time, and it's a bit of a pain to have to shut off your computer every time you want to end it (because it will control the mouse in order to ban people, and because it will run without a GUI or a consol)
So to solve that, I figured hotkeys would be a great idea. Except one problem: everywhere I look, people say you need a GUI to detect keypresses...
If anyone can help, that'd be great. I just need a function that will detect if a key is pressed, like a keylistener. Can be a specific key or any key. Doesn't matter.