ttyutils

package
v0.0.0-...-5815c51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2015 License: MIT, MIT Imports: 5 Imported by: 0

README

ttyutils

Ttyutils is a simple Go package with a few functions for raw TTY IO.

Currently only supports darwin; will soon support linux. Currently rough.

Install

go get github.com/burke/ttyutils

Example

package main

import (
	"github.com/burke/ttyutils"
)

func main() {
  // TODO
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTerminal

func IsTerminal(fd uintptr) bool

func MirrorWinsize

func MirrorWinsize(from, to *os.File) error

func RestoreTerminalState

func RestoreTerminalState(fd uintptr, termios *Termios) error

Types

type Termios

type Termios syscall.Termios

func MakeTerminalRaw

func MakeTerminalRaw(fd uintptr) (*Termios, error)

func NoEcho

func NoEcho(fd uintptr) (*Termios, error)

type Ttysize

type Ttysize struct {
	Lines   uint16
	Columns uint16
}

func Winsize

func Winsize(of *os.File) (Ttysize, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL