Document terminal.getch

This commit is contained in:
def 2015-02-04 14:10:58 +01:00
commit 8640efcd40

View file

@ -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: