-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract stty calls into separate module (#30)
Closes #29
- Loading branch information
1 parent
73a2919
commit 56ffc31
Showing
2 changed files
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Stty = {} | ||
|
||
function Stty.enableRawMode() | ||
os.execute("/bin/stty raw") | ||
end | ||
|
||
function Stty.disableRawMode() | ||
os.execute("/bin/stty sane") | ||
end | ||
|
||
function Stty.disableEcho() | ||
os.execute("/bin/stty -echo") | ||
end | ||
|
||
function Stty.enableEcho() | ||
os.execute("/bin/stty echo") | ||
end | ||
|
||
return Stty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters