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: tui.go
    path of file: ./repos/fzf/src/tui
    
    the code of the file until where you have to start completion: package tui

import (
	"fmt"
	"os"
	"strconv"
	"time"

	"github.com/rivo/uniseg"
)

// Types of user action
type EventType int

const (
	Rune EventType = iota

	CtrlA
	CtrlB
	CtrlC
	CtrlD
	CtrlE
	CtrlF
	CtrlG
	CtrlH
	Tab
	CtrlJ
	CtrlK
	CtrlL
	CtrlM
	CtrlN
	CtrlO
	CtrlP
	CtrlQ
	CtrlR
	CtrlS
	CtrlT
	CtrlU
	CtrlV
	CtrlW
	CtrlX
	CtrlY
	CtrlZ
	ESC
	CtrlSpace
	CtrlDelete

	// https://apple.stackexchange.com/questions/24261/how-do-i-send-c-that-is-control-slash-to-the-terminal
	CtrlBackSlash
	CtrlRightBracket
	CtrlCaret
	CtrlSlash

	Invalid
	Resize
	Mouse
	DoubleClick
	LeftClick
	RightClick
	SLeftClick
	SRightClick
	ScrollUp
	ScrollDown
	SScrollUp
	SScrollDown
	PreviewScrollUp
	PreviewScrollDown

	BTab
	BSpace

	Del
	PgUp
	PgDn

	Up
	Down
	Left
	Right
	Home
	End
	Insert

	SUp
	SDown
	SLeft
	SRight
	SDelete

	F1
	F2
	F3
	F4
	F5
	F6
	F7
	F8
	F9
	F10
	F11
	F12

	Change
	BackwardEOF
	Start
	Load
	Focus
	One
	Zero
	Result

	AltBS

	AltUp
	AltDown
	AltLeft
	AltRight

	AltSUp
	AltSDown
	AltSLeft
	AltSRight

	Alt
	CtrlAlt
)

func (t EventType) AsEvent() Event {
	return Event{t, 0, nil}
}

func (t EventType) Int() int {
	return int(t)
}

func (t EventType) Byte() byte {
	return byte(t)
}

func (e Event) Comparable() Event {
	// Ignore MouseEvent pointer
	return Event{e.Type, e.Char, nil}
}

func Key(r rune) Event {
	return Event{Rune, r, nil}
}

func AltKey(r rune) Event {
	return Event{Alt, r,
    
func MakeBorderStyle(shape BorderShape, unicode bool) BorderStyle {
	if !unicode {
		return BorderStyle{
			shape:       shape,
			top:         '-',
			bottom:      '-',
			left:        '|',
			right:       '|',
			topLeft:     '+',
			topRight:    '+',
			bottomLeft:  '+',
			bottomRight: '+',
		}
	}
	switch shape {
	case BorderSharp:
		return BorderStyle{
			shape:       shape,
			top:         'â”€',
			bottom:      'â”€',
			left:        'â”‚',
			right:       'â”‚',
			topLeft:     'â”Œ',
			topRight:    'â”',
			bottomLeft:  'â””',
			bottomRight: 'â”˜',
		}
	case BorderBold:
		return BorderStyle{
			shape:       shape,
			top:         'â”',
			bottom:      'â”',
			left:        'â”ƒ',
			right:       'â”ƒ',
			topLeft:     'â”',
			topRight:    'â”“',
			bottomLeft:  'â”—',
			bottomRight: 'â”›',
		}
	case BorderBlock:
		// â–›â–€â–€â–€â–€â–€â–€â–€â–€â–€â–€â–€â–€â–€â–€â–€â–€â–€â–€â–œ
		// â–Œ                  â–
		// â–™â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–„â–Ÿ
		return BorderStyle{
			shape:       shape,
			top:         'â–€',
			bottom:      'â–„',
			left:        'â–Œ',
			right:       'â–',
			topLeft:     'â–›',
			topRight:    'â–œ',
			bottomLeft:  'â–™',
			bottomRight: 'â–Ÿ',
		}

	case BorderThinBlock:
		// ðŸ­½â–”â–”â–”â–”â–”â–”â–”â–”â–”â–”â–”â–”â–”â–”â–”â–”â–”â–”ðŸ­¾
		// â–                  â–•
		// ðŸ­¼â–â–â–â–â–â–â–â–â–â–â–â–â–â–â–â–â–â–ðŸ­¿
		return BorderStyle{
			shape:       shape,
			top:         'â–”',
			bottom:      'â–',
			left:        'â–',
			right:       'â–•',
			topLeft:     'ðŸ­½',
			topRight:    'ðŸ­¾',
			bottomLeft:  'ðŸ­¼',
			bottomRight: 'ðŸ­¿',
		}

	case BorderDouble:
		return BorderStyle{
			shape:       shape,
			top:         'â•',
			bottom:      'â•',
			left:        'â•‘',
			right:       'â•‘',
			topLeft:     'â•”',
			topRight:    'â•—',
			bottomLeft:  'â•š',
			bottomRight: 'â•',
		}
	}
	return BorderStyle{
		shape:       shape,
		top:         'â”€',
		bottom:      'â”€',
		left:        'â”‚',
		right:       'â”‚',
		topLeft:     'â•­',
		topRight:    'â•®',
		bottomLeft:  'â•°',
		bottomRight: 'â•¯',
	}
}