From 17caaf63409a38ea7450ef00a7f58d982d02c38b Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 19 Nov 2015 17:41:12 -0500 Subject: Initial commit. Placeholder RoboFont observer code. Start with RoboFont's sample code for creating an observer. The goal is to observe key presses in Space Center and equalise sidebearings when a special key is pressed so that this functionality can be triggered from the keyboard instead of needing to open the control-click contextual menu and selecting it from the menu options. --- observer_test.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 observer_test.py diff --git a/observer_test.py b/observer_test.py new file mode 100644 index 0000000..26a963a --- /dev/null +++ b/observer_test.py @@ -0,0 +1,10 @@ +from mojo.events import addObserver + +class EqualizeSidebearings: + def __init__(self): + addObserver(self, 'center', 'spaceCenterKeyUp') + + def center(self, info): + print info + +EqualizeSidebearings() \ No newline at end of file -- cgit v1.2.3