CodexHotKey
CodexHotKey is a lightweight VS Code extension that provides a smart Ctrl+L / Cmd+L shortcut for OpenAI Codex.
Smart behavior
- If there is a selection in a file editor: send the selection to the current Codex thread (
chatgpt.addToThread).
- If there is no selection: open the Codex sidebar (
chatgpt.openSidebar).
Default keybinding
- Windows/Linux:
Ctrl+L
- macOS:
Cmd+L
Requirements
- OpenAI Codex VS Code extension (
openai.chatgpt) must be installed and enabled.
LaTeX Workshop conflict
LaTeX Workshop uses Cmd+L ... / Ctrl+L ... chord shortcuts in LaTeX files. In that case VS Code may show:
(Cmd+L) was pressed. Waiting for second key...
CodexHotKey automatically checks for this conflict after VS Code starts. If it finds LaTeX Workshop
using Cmd+L ... / Ctrl+L ... chords, it moves those chords to Cmd+Alt+L ... /
Ctrl+Alt+L ... and asks you to reload VS Code.
You can also run this command manually:
CodexHotKey: Patch LaTeX Workshop Cmd+L Chords
The command updates LaTeX Workshop's installed package.json by moving those chords to Cmd+Alt+L ... / Ctrl+Alt+L ..., and creates a backup named package.json.codexhotkey.bak.
You must reload VS Code after patching. If LaTeX Workshop is updated, CodexHotKey will check the new version again on startup.
Vim users
This extension contributes Ctrl+L both in normal editor focus and in Vim-active contexts. If your Vim setup still captures Ctrl+L, set:
"vim.handleKeys": {
"<C-l>": false
}
Commands
CodexHotKey: Smart Ctrl+L
CodexHotKey: Add Selection to Codex Thread
CodexHotKey: Patch LaTeX Workshop Cmd+L Chords