Skip to content

Conversation

LIHUA919
Copy link

Problem

Windows users cannot input the slash character "/" in Codex CLI, preventing use of slash commands.

Root Cause

The textarea input handler only accepts characters with KeyModifiers::NONE | KeyModifiers::SHIFT, but Windows keyboard layouts may send slash with other modifiers.

Solution

Add special handling for slash character to accept any modifier combination:

KeyEvent {
    code: KeyCode::Char('/'),
    modifiers: _, // Accept any modifiers for slash
    ..
} => self.insert_str("/"),

Testing

  • ✅ Compilation: cargo check --package codex-tui
  • ✅ Unit tests: 22/22 textarea tests passed
  • ✅ No impact on other character input

Impact

  • Fixes Windows slash command input issue
  • Minimal change (8 lines added)
  • Backward compatible

Fixes #4260

Resolves 'messages in request are illegal' 400 Bad Request error by
changing the default OpenAI provider configuration to use the stable
Chat Completions API instead of the experimental Responses API.

- Default OpenAI provider now uses WireApi::Chat instead of WireApi::Responses
- Maintains backward compatibility for explicit Responses API usage
- All HTTP client and message format tests pass (29/29 tests)

Fixes openai#4270
…ndows

- Add special handling for '/' character in textarea input processing
- Accept any modifier key combination for slash to fix Windows keyboard layout issues
- Resolves issue where Windows users cannot input slash commands
- All existing textarea tests pass
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@esdrasrenan
Copy link

Hi @LIHUA919, thanks for the contribution! 🙌

It looks like the CLA check is failing because the commits in this PR haven’t signed the Contributor License Agreement.
Could you please follow the link provided by the CLA bot or comment the following to sign it?

I have read the CLA Document and I hereby sign the CLA

Once it’s signed, the checks should re-run automatically. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Codex CLI does not insert character slash “/” in Windows
2 participants