MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getNewlineInstructions

Function getNewlineInstructions

src/components/PromptInput/utils.ts:17–32  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17export 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

Callers 1

PromptInputHelpMenuFunction · 0.85

Calls 2

hasUsedBackslashReturnFunction · 0.85

Tested by

no test coverage detected