Function InputEvent.terminal

Returns a pointer to the terminal associated with this event. (You can usually just ignore this as there's only one terminal typically.)

Terminal* terminal() @property;

It may be null in the case of program-generated events;