πŸ“„ File detail

utils/keyboardShortcuts.ts

🧩 .tsπŸ“ 15 linesπŸ’Ύ 568 bytesπŸ“ text
← Back to All Files

🎯 Use case

This file lives under β€œutils/”, which covers cross-cutting helpers (shell, tempfiles, settings, messages, process input, …). On the API surface it exposes MACOS_OPTION_SPECIAL_CHARS and isMacosOptionChar β€” mainly functions, hooks, or classes. What the file header says: Special characters that macOS Option+key produces, mapped to their keybinding equivalents. Used to detect Option+key shortcuts on macOS terminals that don't have "Option as Meta" enabled.

Generated from folder role, exports, dependency roots, and inline comments β€” not hand-reviewed for every path.

🧠 Inline summary

Special characters that macOS Option+key produces, mapped to their keybinding equivalents. Used to detect Option+key shortcuts on macOS terminals that don't have "Option as Meta" enabled.

πŸ“€ Exports (heuristic)

  • MACOS_OPTION_SPECIAL_CHARS
  • isMacosOptionChar

πŸ–₯️ Source preview

// Special characters that macOS Option+key produces, mapped to their
// keybinding equivalents. Used to detect Option+key shortcuts on macOS
// terminals that don't have "Option as Meta" enabled.
export const MACOS_OPTION_SPECIAL_CHARS = {
  '†': 'alt+t', // Option+T -> thinking toggle
  Ο€: 'alt+p', // Option+P -> model picker
  ΓΈ: 'alt+o', // Option+O -> fast mode
} as const satisfies Record<string, string>

export function isMacosOptionChar(
  char: string,
): char is keyof typeof MACOS_OPTION_SPECIAL_CHARS {
  return char in MACOS_OPTION_SPECIAL_CHARS
}