Skip to content

Commit

Permalink
Ghostty does arrow key emulation out of the box
Browse files Browse the repository at this point in the history
  • Loading branch information
walles committed Jan 12, 2025
1 parent f47a1be commit 523c426
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions twin/screen.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,12 @@ func terminalHasArrowKeysEmulation() bool {
return true
}

// Ghostty 1.0.1, tested on macOS 15.1.1, Jan 12th, 2025
if os.Getenv("TERM_PROGRAM") == "ghostty" {
log.Info("Ghostty terminal detected, assuming arrow keys emulation active")
return true
}

log.Info("No known terminal with arrow keys emulation detected, assuming mouse tracking is needed")
return false
}
Expand Down

0 comments on commit 523c426

Please sign in to comment.