Skip to content

Instantly share code, notes, and snippets.

View uberswe's full-sized avatar

Uberswe uberswe

  • Västerås, Sweden
  • 14:22 (UTC +02:00)
View GitHub Profile
__author__ = 'MarkusTenghamn'
# cocoa_keypress_monitor.py by Bjarte Johansen is licensed under a
# License: http://ljos.mit-license.org/
# add the terminal application you run python from to application that are allowed to control your computer. This can be done in System Preferences > Privacy > Accessability.
from AppKit import NSApplication, NSApp
from Foundation import NSObject, NSLog
from Cocoa import NSEvent, NSKeyDownMask
from PyObjCTools import AppHelper