[READ-ONLY] Mirror of https://github.com/bombshell-dev/tty. Platform independent 2D layout engine for terminal applications based on Clay bomb.sh/docs/tty
Something went wrong. Try again.
TypeScript
123456789101112131415161718import process from "node:process";import type { Term } from "../mod.ts";
/** * Assert OSC 22 pointer-shape support by hand. * * Some terminals (ghostty among them) can set pointer shapes but never answer * the OSC 22 support query, so capability detection cannot see them. Run the * demo with TTY_POINTER_SHAPES=1 to fold the equivalent CapabilityEvent into * the term — the same opt-in a host can make with * `term.update([{ type: "capability", key: "pointer-shape", value: true }])`. */export function optInPointerShapes(term: Term): void { if (process.env.TTY_POINTER_SHAPES === "1") { term.update([{ type: "capability", key: "pointer-shape", value: true }]); }}