Transforming important SDL events to custom ones.