move position by key input made with C