You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: reader_keypress.go
    path of file: ./repos/scan4all/vendor/github.com/projectdiscovery/utils/reader
    
    the code of the file until where you have to start completion: package reader

import (
	"context"
	"os"
	"sync"
	"time"

	"github.com/projectdiscovery/utils/reader/rawmode"
)

type KeyPressReader struct {
	originalMode interface{}
	Timeout      time.Duration
	datachan     chan []byte
	Once         *sync.Once
	Raw          bool
	BufferSize   int
}

func (reader *KeyPressReader) Start() error {
	reader.Once.Do(func
    
func (reader KeyPressReader) Read(p []byte) (n int, err error) {
	var (
		ctx    context.Context
		cancel context.CancelFunc
	)
	if reader.Timeout > 0 {
		ctx, cancel = context.WithTimeout(context.Background(), time.Duration(reader.Timeout))
		defer cancel()
	}

	select {
	case <-ctx.Done():
		err = ErrTimeout
		return
	case data := <-reader.datachan:
		n = copy(p, data)
		return
	}
}