vscode icon indicating copy to clipboard operation
vscode copied to clipboard

execCut and execPaste commands not working in custom keybindings in 1.101?

Open pokutuna opened this issue 6 months ago • 0 comments

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.101.0 (dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1, arm64)
  • OS Version: macOS 14.7.1 (23H222)

Steps to Reproduce:

  1. Launch VS Code in clean environment: code --disable-extensions --user-data-dir=$(mktemp -d) .
  2. Create custom keybindings using execCopy, execCut and execPaste commands
  3. Add the following to keybindings.json:
[
  {
    "key": "ctrl+1",
    "command": "execCopy"
  },
  {
    "key": "ctrl+2",
    "command": "execCut"
  },
  {
    "key": "ctrl+3",
    "command": "execPaste"
  }
]
  1. Try to use the custom keybindings (Ctrl+1 to copy, Ctrl+2 to cut, Ctrl+3 to paste)

Expected Result:

  • Ctrl+1 should copy the current selection
  • Ctrl+2 should cut the current selection
  • Ctrl+3 should paste the content from clipboard

Actual Result:

  • The keybindings do not execute the copy/cut/paste operations
  • No error messages are displayed

More Info:

  • This worked in VS Code 1.100.3 (258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3, arm64) but fails in 1.101.0 (dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1, arm64)
  • Keybindings are recognized in Keyboard Shortcuts settings but do not execute
  • No error messages or console errors appear
  • Default Cmd+C/Cmd+x and Cmd+V "Copy"/"Cut"/"Paste" work normally
  • editor.action.clipboardCopyAction and others work in custom keybindings
  • I noticed this while using complex keybindings and created this simple reproduction case

I suspect this might be user error on my env since such basic functionality not working seems unlikely, but the issue persists even in the cleanest possible environment.

pokutuna avatar Jun 13 '25 18:06 pokutuna