the last moved reacts to keyboard + refactor