# newline_shortcut

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/config/newline_shortcut)

Return the terminal-appropriate label for the newline keyboard shortcut.

Prefers `Shift+Enter` when the terminal is known to support the kitty
keyboard protocol, either via conservative terminal-identity heuristics
or the `DEEPAGENTS_CODE_KITTY_KEYBOARD` override. Falls back to
`Option+Enter` on macOS and `Ctrl+J` elsewhere — both survive legacy
terminals that strip the shift modifier from `Enter`.

## Signature

```python
newline_shortcut() -> str
```

## Returns

`str`

A human-readable shortcut string,
e.g. `'Shift+Enter'`, `'Option+Enter'`, or `'Ctrl+J'`.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/0412009c5441bef8d75a427e1da8909e33ab5b56/libs/code/deepagents_code/config.py#L893)