forked from roc-lang/basic-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTty.roc
More file actions
14 lines (13 loc) · 748 Bytes
/
Tty.roc
File metadata and controls
14 lines (13 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
## Provides functionality to change the behaviour of the terminal.
## This is useful for running an app like vim or a game in the terminal.
Tty := [].{
## Enable terminal [raw mode](https://en.wikipedia.org/wiki/Terminal_mode) to disable some default terminal bevahiour.
##
## This leads to the following changes:
## - Input will not be echoed to the terminal screen.
## - Input will be sent straight to the program instead of being buffered (= collected) until the Enter key is pressed.
## - Special keys like Backspace and CTRL+C will not be processed by the terminal driver but will be passed to the program.
enable_raw_mode! : () => {}
## Revert terminal to default behaviour
disable_raw_mode! : () => {}
}