Skip to content

Commit

Permalink
Fix windows not receiving arrow keys (golang/go#68830) (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly authored Aug 10, 2024
1 parent ed77b0f commit 07a4a9e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions term_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func makeRaw(fd int) (*State, error) {
return nil, err
}
raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT)
raw |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT
if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil {
return nil, err
}
Expand Down

0 comments on commit 07a4a9e

Please sign in to comment.