Document terminal.getch
This commit is contained in:
parent
e7eab49e14
commit
8640efcd40
1 changed files with 2 additions and 0 deletions
|
|
@ -365,6 +365,8 @@ macro styledEcho*(m: varargs[expr]): stmt =
|
||||||
result.add(newCall(bindSym"resetAttributes"))
|
result.add(newCall(bindSym"resetAttributes"))
|
||||||
|
|
||||||
proc getch*(): char =
|
proc getch*(): char =
|
||||||
|
## Read a single character from the terminal, blocking until it is entered.
|
||||||
|
## The character is not printed to the terminal.
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
result = winGetch().char
|
result = winGetch().char
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue