https://kotlinlang.org logo
#squarelibraries
Title
# squarelibraries
m

Michael Friend

03/01/2023, 1:29 AM
Side question, do you have a link to somewhere to help me understand whats going on in the input reading section of the robot sample? I poked around in the docs for JLine and couldnt find any references for the non ascii key codes e.g. enter space etc. Specifically unsure whats going on with the nested reads to get the arrow inputs
Found a good source for this. Back documenting its using the fact that the arrow keys are pushed through the terminal as a 3 Char sequence Starting with
<ESC>[
then a character to denote what key. So up is
<ESC>[A
which is 27(ESC), then 91(
[
), then 65
A
. Hence the 3 reads for arrow keys This table was useful https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797
4 Views