File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,14 @@ func isTerminal(fd int) bool {
20
20
return err == nil
21
21
}
22
22
23
+ // This is intended to be used on a console input handle.
24
+ // See https://learn.microsoft.com/en-us/windows/console/setconsolemode
23
25
func makeRaw (fd int ) (* State , error ) {
24
26
var st uint32
25
27
if err := windows .GetConsoleMode (windows .Handle (fd ), & st ); err != nil {
26
28
return nil , err
27
29
}
28
- raw := st &^ (windows .ENABLE_ECHO_INPUT | windows .ENABLE_PROCESSED_INPUT | windows .ENABLE_LINE_INPUT | windows . ENABLE_PROCESSED_OUTPUT )
30
+ raw := st &^ (windows .ENABLE_ECHO_INPUT | windows .ENABLE_PROCESSED_INPUT | windows .ENABLE_LINE_INPUT )
29
31
raw |= windows .ENABLE_VIRTUAL_TERMINAL_INPUT
30
32
if err := windows .SetConsoleMode (windows .Handle (fd ), raw ); err != nil {
31
33
return nil , err
You can’t perform that action at this time.
0 commit comments