Skip to content

Commit

Permalink
FreeBSD keybindings fix. Closes #218
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmota committed Dec 29, 2019
1 parent 93860e1 commit 58d4fcb
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

package termbox

import "github.com/mattn/go-runewidth"
import "fmt"
import "os"
import "os/signal"
import "syscall"
import "runtime"
import "time"
import (
"fmt"
"os"
"os/signal"
"runtime"
"syscall"
"time"

"github.com/mattn/go-runewidth"
)

// public API

Expand All @@ -24,7 +27,7 @@ import "time"
func Init() error {
var err error

if runtime.GOOS == "openbsd" {
if runtime.GOOS == "openbsd" || runtime.GOOS == "freebsd" {
out, err = os.OpenFile("/dev/tty", os.O_RDWR, 0)
if err != nil {
return err
Expand Down

0 comments on commit 58d4fcb

Please sign in to comment.