Only define the custom events if that's actually possible (duh)