window: read_key: move cursor back to position it was at before callbacks were called