Dont set echo mode
This commit is contained in:
parent
efa54142eb
commit
c79f2b51a1
1 changed files with 2 additions and 2 deletions
|
@ -6,14 +6,14 @@ String getKeyPress() {
|
||||||
String str = "";
|
String str = "";
|
||||||
while (!ret) {
|
while (!ret) {
|
||||||
// Disable line mode to capture a single key press without requiring Enter
|
// Disable line mode to capture a single key press without requiring Enter
|
||||||
stdin.echoMode = false;
|
//stdin.echoMode = false;
|
||||||
stdin.lineMode = false;
|
stdin.lineMode = false;
|
||||||
|
|
||||||
// Read a single byte from stdin
|
// Read a single byte from stdin
|
||||||
int byte = stdin.readByteSync();
|
int byte = stdin.readByteSync();
|
||||||
|
|
||||||
// Restore line mode and echo mode to default settings
|
// Restore line mode and echo mode to default settings
|
||||||
stdin.echoMode = true;
|
//stdin.echoMode = true;
|
||||||
stdin.lineMode = true;
|
stdin.lineMode = true;
|
||||||
|
|
||||||
// Return the character representation of the byte
|
// Return the character representation of the byte
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue