kotter
kotter copied to clipboard
A declarative, Kotlin-idiomatic API for writing dynamic console applications.
Context: https://www.reddit.com/r/Kotlin/comments/q17zjq/introducing_konsole_a_kotlinidiomatic_library_for/hfggbsv/ Currently, this library is JVM only. Adding native support would allow users to use this library in a Kotlin native context, which would: - result in smaller file...
…simple implementation in VirtualTerminal, and use in 'input' example. Fixes #84. Hope this is useful for you. Running in iTerm... Also see the definitive reference https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
See also: https://en.wikipedia.org/wiki/ANSI_escape_code#OSC_(Operating_System_Command)_sequences See also: https://github.com/varabyte/kotter/issues/12#issuecomment-1144444459 See also: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda I'd really like to do this assuming support for it is standard across all of the main terminals. @cbcmg FYI
Kotter aims to be opinionated about its ansi output and (via the Virtual Console) the subset of ansi it supports, so don't let users add whatever they want into their...
I think numpad keys report different control characters that I could handle, and it might be nice to have an alternate set of keys which could be used for navigating...
Well, nuts. String.length miscounts unicode characters and we might be using it everywhere. Something like this should render incorrectly ``` bordered { textLine("Hello") textLine("Oh my stars ⭐⭐⭐ this just screws...
The README covers a very simple (and hopefully common!) input flow -- one input per section. However, multiple input() calls per section are allowed as long as you only set...
The following underline { textLine("Test") } currently adds a weird tiny piece of underline on the next line. This only happens in the virtual terminal, not in an actual terminal.
Right now, if an exception occurs within run, the program just exists. A user can themselves wrap everything inside a try / catch block, but it might be nice if...
Create a test executor and test terminal so we can verify behaviors in unit tests.