Skip to content

feat(shell): add Alt+V paste shortcut for Windows Terminal#783

Open
ThanhNguyxn wants to merge 1 commit intoMoonshotAI:mainfrom
ThanhNguyxn:feat/windows-alt-v-paste
Open

feat(shell): add Alt+V paste shortcut for Windows Terminal#783
ThanhNguyxn wants to merge 1 commit intoMoonshotAI:mainfrom
ThanhNguyxn:feat/windows-alt-v-paste

Conversation

@ThanhNguyxn
Copy link

@ThanhNguyxn ThanhNguyxn commented Jan 29, 2026

Summary

  • Add Alt+V (escape v) as alternative paste shortcut for Windows Terminal users

Related Issue

Fixes #781

Description

Windows Terminal intercepts Ctrl+V for its own paste operation, preventing the shortcut from reaching kimi-cli. This makes it impossible to paste images using the keyboard in Windows Terminal.

This PR adds Alt+V (escape v) as an alternative binding, consistent with Claude Code's approach. Both shortcuts now work:

  • Ctrl+V - Standard paste (works in most terminals)
  • Alt+V - Alternative paste (works in Windows Terminal)

Changes Made

Modified File: src/kimi_cli/ui/shell/prompt.py

@_kb.add("c-v", eager=True)
@_kb.add("escape", "v", eager=True)  # Alt+V for Windows Terminal
def _(event: KeyPressEvent) -> None:
    if self._try_paste_image(event):
        return
    clipboard_data = event.app.clipboard.get_data()
    event.current_buffer.paste_clipboard_data(clipboard_data)

Testing

  • Module imports successfully
  • Ruff lint passed
  • Format check passed

Checklist

  • I have read the CONTRIBUTING document.
  • I have linked the related issue.
  • I have added tests that prove my feature works.
  • I have run make gen-changelog to update the changelog.
  • I have run make gen-docs to update the user documentation.

Open with Devin

Windows Terminal intercepts Ctrl+V for its own paste operation, preventing
the shortcut from reaching kimi-cli. This adds Alt+V (escape v) as an
alternative binding, consistent with Claude Code's approach.

Fixes MoonshotAI#781
Copy link

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional flags.

Open in Devin Review

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.

[Windows] Ctrl+V 无法在 Windows Terminal 中粘贴图片,建议添加 Alt+V 备选快捷键

1 participant