[MAC] Get current keystate

Hey, I'm trying to make a basic keylogger on my Mac to pull a prank on my friend. Anyway, I need to get the current keystate, and the application should be running in the background, as in, he is not in the GUI or Terminal of the application. Is this possible? Or will I have to use Applescript?
Topic archived. No new replies allowed.