diff --git a/main.py b/main.py index ce2bfcc..2aab8d9 100644 --- a/main.py +++ b/main.py @@ -16,10 +16,14 @@ class Main: bongocat = Bongocat() clackmanager = Clackmanager() - debug = True + debug = len(sys.argv) > 1 and sys.argv[1] == '--debug' sounds = False def init(self, linux): + if linux: + from pyxhook import HookManager + else: + from pyHook import HookManager hooks_manager = HookManager() hooks_manager.KeyDown = self.OnKeyDown @@ -70,7 +74,6 @@ class Main: def OnKeyDown(self, event): self.input_manager.press_key(event.Key) - print event.Message return True def OnKeyUp(self, event): @@ -88,10 +91,8 @@ class Main: if __name__ == "__main__": from sys import platform if platform == "linux" or platform == "linux2": - from pyxhook import HookManager linux = True else: - from pyHook import HookManager linux = False main = Main()