I have it managed in a separate thread in snip. Since it has to be portable, I couldn't go with termbox.
https://github.com/genotrance/snip/blob/master/src/snip/key.nim
Maybe this will interest you: I'm writing small cross-platform Nim console library that can do non-blocking keyboard input (among other things, like double buffered output and box drawing). It's meant to be a very much simplified curses replacement, hence the name illwill :) It's in alpha status, officially not released yet, but you might find it useful or you can just copy relevant parts.