neandertech / cue4s

Experimental library for CLI prompts in Scala 3, available on JS, JVM, and Native platforms
Apache License 2.0
16 stars 0 forks source link

Investigate windows support #7

Open keynmol opened 3 months ago

keynmol commented 3 months ago

Personally I don't use Windows, and wouldn't even begin to know how to approach this.

What we need for cue4s to work on windows is:

  1. some implementation of Terminal (see ANSI-codes based one: https://github.com/neandertech/cue4s/blob/main/modules/core/src/main/scala/AnsiTerminal.scala#L19)
  2. a cross-platform way to put terminal in char mode: https://github.com/neandertech/cue4s/blob/main/modules/core/src/main/scalanative/InputProviderImpl.scala#L29-L39. Perhaps on JS this is already abstracted away
  3. a way to read a single character (e.g. getchar() on native)
keynmol commented 1 week ago

This looks vaguely related: https://learn.microsoft.com/en-us/windows/console/setconsolemode