Merge branch '2023-03-28-correct-several-cli_getch-bugs'

- Merge a regression fix (for an issue that we raised post v2023.01)
  with cli_getch(), and include a test now.