import pygame
from sys import modules
-events = ['TIMEOUT', 'NOTEON', 'NOTEOFF', 'NOTEEND', 'COLDOWN', 'COLUP', 'COLOVER']
+events = ['TIMEOUT',
+ 'NOTEON',
+ 'NOTEOFF',
+ 'NOTEEND',
+ 'COLDOWN',
+ 'COLUP',
+ 'COLOVER',
+ 'COLSTATECHANGE']
+
eventNames = {}
self = modules[__name__]
for name in pygame_events :
eventNames[getattr(pygame, name)] = name
+
+eventCodes = dict([v, k] for k, v in eventNames.items())