CLAUDE_CODE_ALTGR_AS_TEXT
Updated by Alex Sorokoletov
CLAUDE_CODE_ALTGR_AS_TEXT is a Claude Code environment variable: Controls whether AltGr key input is treated as text: a true value forces it on, a false value forces it off, and otherwise it is auto-detected, on under Windows Terminal. Added between v2.1.143 and v2.1.212 and still present in v2.1.332. It is not in the official reference.
| Status | Present in v2.1.332 |
|---|---|
| Added | Added between v2.1.143 and v2.1.212 |
| Category | Other |
| Official docs | Not listed |
How to set it
For one session, export it in the shell that starts Claude Code:
export CLAUDE_CODE_ALTGR_AS_TEXT=<value>
claudeTo apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"CLAUDE_CODE_ALTGR_AS_TEXT": "<value>"
}
}Related variables
CLAUDE_CODE_ARTIFACT_TEXT_VARIANT: Selected the artifact text variant; accepted v1 or v2 and treated any other value as v0, which was also the default.CLAUDE_CODE_SILENT_TURN_REMINDER_TEXT: Overrides the text of the silent-turn reminder (the nudge injected after turns that produce no output).ANTHROPIC_BETAS: Comma-separated beta feature headers.ANTHROPIC_CUSTOM_HEADERS: Custom HTTP headers (newline-separated Key: Value).ANTHROPIC_FEDERATION_RULE_IDANTHROPIC_ORGANIZATION_IDANTHROPIC_WORKSPACE_IDBETA_TRACING_ENDPOINT: Custom endpoint for beta tracing.
Frequently asked questions
What does CLAUDE_CODE_ALTGR_AS_TEXT do?
Controls whether AltGr key input is treated as text: a true value forces it on, a false value forces it off, and otherwise it is auto-detected, on under Windows Terminal.
Which Claude Code version has CLAUDE_CODE_ALTGR_AS_TEXT?
Added between v2.1.143 and v2.1.212 and still present in v2.1.332.
How do I set CLAUDE_CODE_ALTGR_AS_TEXT?
Export it before starting Claude Code (export CLAUDE_CODE_ALTGR_AS_TEXT=value), or add it to the "env" object in ~/.claude/settings.json to apply it to every session.
All variables, searchable: Claude Code environment variables.