Skip to content

zeyutang/kilo-code-kb-patch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kilo Code Keyboard Patch

VS Marketplace Version VS Marketplace Downloads Open VSX Version Open VSX Downloads

Patches Kilo Code's keyboard behavior: Enter starts a new line, Cmd+Enter sends, and permission prompts stop hijacking your keystrokes while you are typing.

Supported versions (latest three)

Kilo Code KB Patch
7.4.16+ 1.10.x
7.4.15 1.9.x
7.4.13 1.8.x
(prev.) (prev.)

Each patch release keeps the earlier versions' patterns, so a newer patch still works on an older Kilo Code.

What it does

Keyboard patches

Key Before Patched (native Kilo Code) After Patched
Enter Send / Approve New line (approves when the chat box is empty)
Cmd+Enter Send / Save Send / Approve / Save
Shift+Enter New line New line (unchanged)
Escape Reject / Abort Reject / Abort only when the chat box is empty
Shift+Escape Reject / Abort Reject / Abort (always)

Applies to the chat input, the permission prompt, and the KiloClaw edit/chat panels.

Bonus

Two optional extras, off by default. Enable either one from the Settings UI (search "Kilo Code KB Patch") or in your settings.json, then reload the window (Cmd+Shift+PDeveloper: Reload Window). To turn one off, set it to false (or run Restore Originals, which switches both off) and reload.

  • Attach-file button. Adds a + button to the prompt toolbar that opens Kilo Code's file picker directly, instead of typing @ and choosing "Browse files...".

    "kiloCodeKbPatch.addAttachFileButton": true
  • Relocate the "Open in Tab" icon. Retitles Kilo Code's editor-title "Open in Tab" action to "Kilo Code: Open" so its icon sorts next to other AI "Open" icons in the editor title bar.

    "kiloCodeKbPatch.renameOpenInTab": true

Install

The extension locates Kilo Code by asking the running editor where it is installed, so native VS Code and its forks need no additional configuration: VSCodium, Cursor, Windsurf, remote servers, and custom --extensions-dir setups.

VS Code

Install from the VS Code Marketplace: Kilo Code KB Patch

VSCodium, Cursor, Windsurf, and other forks

Install from the Open VSX Registry: Kilo Code KB Patch

Get Kilo Code patched

The extension detects an unpatched Kilo Code and offers to apply. Three commands are available from the Command Palette (Cmd+Shift+P → "Kilo Code KB Patch"):

  • Apply Patches
  • Restore Originals (also switches the bonus settings off)
  • Show Status

Reload the window after applying KB Patch: Cmd+Shift+PDeveloper: Reload Window.

How keystrokes are routed

Kilo Code asks for your input in three ways. The patch rewires only one of them (permission prompts) and decides purely by whether the chat box contains text; spaces and newlines do not count.

KB Patch never moves the keyboard focus. Because Kilo Code moves focus on its own, a choice can take over the keyboard even when you have typed something. When that happens your keys act on the highlighted choice (this is intended, with minimal interference with the native Kilo Code experience).

Permission prompts

Approve or reject a tool or command. The only surface the patch rewires.

  • Kilo Code does not shift focus here: it leaves focus in the chat box and intercepts keys with a document-level listener, so the patch can read the chat box content and route accordingly.

The chat box content decides where each key goes:

Key Chat box empty Chat box has text
Enter Approve New line
Space Approve Space
Cmd+Enter Approve Approve
Escape Reject Dismiss autocomplete only
Shift+Escape Reject Reject

Reject and abort use Shift+Escape (not Cmd+Escape, which is Claude Code's quick-launch shortcut).

Follow-up questions

Pick a suggested answer or type your own. The patch leaves these alone.

  • Kilo Code auto-focuses the first option when the prompt appears, so keys act on the highlighted choice regardless of what is in the chat box.
  • Arrow keys move between choices, Enter selects, and Cmd+Enter send the choice.

Menus and dialogs

Model and mode pickers, confirmations, @-mentions. The patch leaves these alone.

  • Kilo Code moves focus into them when they open and handles their keys: arrow keys or type-ahead to move, Enter to choose, Escape to close pop-up menu without invoking the permission prompt abort.

Troubleshooting

  • No effect: reload the VS Code window after applying.
  • Stopped working after a Kilo Code update: updates overwrite the patched files and can rename Kilo Code's internal code. Re-apply by Cmd+Shift+PKilo Code KB Patch: Apply Patches.
  • "Could not find a kilocode.kilo-code-* install": Kilo Code is not installed in this editor (the message lists every folder searched). Install Kilo Code first, then re-run Apply Patches.

Releases

Packages

Contributors

Languages