repair input bug, add input-mode