Last active
May 9, 2021 21:18
-
-
Save okay-type/dbdbcd65282f0dfe04aa86f861103606 to your computer and use it in GitHub Desktop.
rf4 version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mojo.subscriber import Subscriber, registerGlyphEditorSubscriber | |
class SimpleSubscriberTest(Subscriber): | |
debug = False | |
def build(self): | |
if self.debug == True: | |
print('SimpleSubscriberTest', 'SimpleSubscriberTestbuild!') | |
def destroy(self): | |
if self.debug == True: | |
print('SimpleSubscriberTest', 'destroy!') | |
def glyphEditorDidKeyDown(self, info): | |
print('keyWasPressed') | |
event = info['lowLevelEvents'][0]['event'] | |
print(event) | |
characters = event.characters() | |
print(characters) | |
registerGlyphEditorSubscriber(SimpleSubscriberTest) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment