mirror of
https://github.com/jixishi/SerialTerminalForWindowsTerminal.git
synced 2026-06-15 16:42:46 +00:00
e0de872740
Extract ConvertChunk/FormatHexFrame into pkg/charset (zero external deps). Extract UIEvent/UIEventKind/UIPanelKind types into internal/event. Update all references across main package to use qualified imports. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
15 lines
293 B
Go
15 lines
293 B
Go
//go:build windows
|
|
|
|
package main
|
|
|
|
import (
|
|
"golang.org/x/sys/windows"
|
|
)
|
|
|
|
func enableVTInput(fd int) {
|
|
var mode uint32
|
|
if err := windows.GetConsoleMode(windows.Handle(fd), &mode); err == nil {
|
|
_ = windows.SetConsoleMode(windows.Handle(fd), mode|windows.ENABLE_VIRTUAL_TERMINAL_INPUT)
|
|
}
|
|
}
|