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 {
2020 return err == nil
2121}
2222
23+ // This is intended to be used on a console input handle.
24+ // See https://learn.microsoft.com/en-us/windows/console/setconsolemode
2325func makeRaw (fd int ) (* State , error ) {
2426 var st uint32
2527 if err := windows .GetConsoleMode (windows .Handle (fd ), & st ); err != nil {
2628 return nil , err
2729 }
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 )
2931 raw |= windows .ENABLE_VIRTUAL_TERMINAL_INPUT
3032 if err := windows .SetConsoleMode (windows .Handle (fd ), raw ); err != nil {
3133 return nil , err
You can’t perform that action at this time.
0 commit comments