Fix Ctrl-S handling

This commit is contained in:
Timothy Warren 2019-10-22 17:50:35 -04:00
parent 5642187c0e
commit 6d0074ffd3

View File

@ -23,7 +23,7 @@ function enableRawMode(): void
// So, the only thing that seems to really matter here is that c_oflag is 0...
$termios = clone $original_termios;
$termios->c_iflag = $termios->c_iflag & ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
$termios->c_iflag = 0; //$termios->c_iflag & ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
$termios->c_oflag = 0; // $termios->c_oflag && ~(OPOST);
$termios->c_cflag |= (CS8);
$termios->c_lflag = $termios->c_lflag & ~(_ECHO | ICANON | IEXTEN | ISIG);
@ -97,4 +97,4 @@ function ctrl_key(string $char): int
// b1,100,001 (a) & b0,011,111 = b0,000,001
// b1,100,010 (b) & b0,011,111 = b0,000,010
return ord($char) & 0x1f;
}
}