MainThread adapted to separated KeyHandler