-2

I'm trying to build a program in Kotlin native. The target is Windows in my case : mingwX64("mingw"). I want to build just a simple exe file without any dependencies.

How can I have a loop that just reads characters as they are entered by key presses from stdin?

I know that there's the "readLine()" function, but I would like to read individual characters.

treesAreEverywhere
  • 3,722
  • 4
  • 28
  • 51

1 Answers1

1

To read individual keypress (in non-portable way) use Get key press in windows console, all APIs there shall be available via platform.windows package.

Nikolay Igotti
  • 580
  • 2
  • 7