()
| 15 | } |
| 16 | |
| 17 | export function getNewlineInstructions(): string { |
| 18 | // Apple Terminal on macOS uses native modifier key detection for Shift+Enter |
| 19 | if (env.terminal === 'Apple_Terminal' && process.platform === 'darwin') { |
| 20 | return 'shift + ⏎ for newline' |
| 21 | } |
| 22 | |
| 23 | // For iTerm2 and VSCode, show Shift+Enter instructions if installed |
| 24 | if (isShiftEnterKeyBindingInstalled()) { |
| 25 | return 'shift + ⏎ for newline' |
| 26 | } |
| 27 | |
| 28 | // Otherwise show backslash+return instructions |
| 29 | return hasUsedBackslashReturn() |
| 30 | ? '\\⏎ for newline' |
| 31 | : 'backslash (\\) + return (⏎) for newline' |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * True when the keystroke is a printable character that does not begin |
no test coverage detected