aboutsummaryrefslogtreecommitdiff
path: root/doc_topics/03-terminal.md
diff options
context:
space:
mode:
authorThijs Schreijer <thijs@thijsschreijer.nl>2025-04-04 15:58:07 +0200
committerThijs Schreijer <thijs@thijsschreijer.nl>2025-04-07 10:51:58 +0200
commit96fb7f1608e00d6f8ceb2a5d9a90483e92fe4e3a (patch)
tree26d279f7f9ea504220fd8c831a7d5f4985d124c6 /doc_topics/03-terminal.md
parentefb8ca600413c4cc70985e9a93aa55ac581134a7 (diff)
downloadluasystem-96fb7f1608e00d6f8ceb2a5d9a90483e92fe4e3a.tar.gz
luasystem-96fb7f1608e00d6f8ceb2a5d9a90483e92fe4e3a.tar.bz2
luasystem-96fb7f1608e00d6f8ceb2a5d9a90483e92fe4e3a.zip
added changelog entry
Diffstat (limited to '')
-rw-r--r--doc_topics/03-terminal.md4
1 files changed, 1 insertions, 3 deletions
diff --git a/doc_topics/03-terminal.md b/doc_topics/03-terminal.md
index 3705cce..a5341d6 100644
--- a/doc_topics/03-terminal.md
+++ b/doc_topics/03-terminal.md
@@ -102,13 +102,11 @@ On Posix the traditional file approach is used, which:
102 102
103To use non-blocking input here's how to set it up: 103To use non-blocking input here's how to set it up:
104 104
105 -- Detach stdin/out/err; to get their own independent file descriptions
106 sys.detachfds()
107
108 -- setup Windows console to disable echo and line input (not required since _getwchar is used, just for consistency) 105 -- setup Windows console to disable echo and line input (not required since _getwchar is used, just for consistency)
109 sys.setconsoleflags(io.stdin, sys.getconsoleflags(io.stdin) - sys.CIF_ECHO_INPUT - sys.CIF_LINE_INPUT) 106 sys.setconsoleflags(io.stdin, sys.getconsoleflags(io.stdin) - sys.CIF_ECHO_INPUT - sys.CIF_LINE_INPUT)
110 107
111 -- setup Posix by disabling echo, canonical mode, and making non-blocking 108 -- setup Posix by disabling echo, canonical mode, and making non-blocking
109 sys.detachfds() -- ensure stdin/out/err have their own file descriptions
112 local of_attr = sys.tcgetattr(io.stdin) 110 local of_attr = sys.tcgetattr(io.stdin)
113 sys.tcsetattr(io.stdin, sys.TCSANOW, { 111 sys.tcsetattr(io.stdin, sys.TCSANOW, {
114 lflag = of_attr.lflag - sys.L_ICANON - sys.L_ECHO, 112 lflag = of_attr.lflag - sys.L_ICANON - sys.L_ECHO,