event-based terminal streaming, fix wip for keyboard events of the same type (broken)