johnnovak / illwill

A curses inspired simple cross-platform console library for Nim
Do What The F*ck You Want To Public License
400 stars 27 forks source link

Getting lowercase char input #2

Closed ajusa closed 5 years ago

ajusa commented 5 years ago

Pretty much the title. I am trying to make a simple text editor using illwill, but based on the given example code the getKey() method returns a Key type, which doesn't seem to support lowercase characters. When I tried printing out keycodes it only printed the uppercase representation, such as "a" -> "A"

Also, if you could give any tips towards creating a text input in illwill, I would really appreciate it :smile:

SolitudeSF commented 5 years ago

they are lowercase, its just string representation that is uppercase. for uppercase chars, you query shifted keys https://github.com/johnnovak/illwill/blob/master/illwill.nim#L132

ajusa commented 5 years ago

Alright thanks! I scrolled right past that code when I was glancing through it.