basic implementation of input event delegation