// SPDX-FileCopyrightText: (C) Copyright 2026 Pim van Pelt // SPDX-License-Identifier: Apache-2.0 //go:build !linux && !openbsd && !freebsd && !netbsd && !dragonfly && !darwin package keypress import "errors" // termiosState is a placeholder so cbreak/restore have a consistent signature on // platforms without a supported termios path. On those platforms cbreak always // fails, so WaitForKey degrades to waiting on the context (it never reads stdin). type termiosState struct{} func cbreak(int) (*termiosState, error) { return nil, errors.New("keypress: cbreak is unsupported on this platform") } func restore(int, *termiosState) error { return nil }