input: fix key repeat and add Key.released