Home > Mobile >  VSCODE command to force content to clipboard
VSCODE command to force content to clipboard

Time:03-18

Is there a vscode command which would permit to force the content of the clipboard ? For example a command like this:

{"command": "editor.action.clipboardCopyAction","args": {"content": "some text to copy to the clipbord"}}

I'm using the multi-command extension which is great and a command like this would be very handy for what I need to do

CodePudding user response:

The extension Command Variable v1.33 has the command extension.commandvariable.setClipboard that will set the clipboard content with the string in the argument:

  {
    "key": "ctrl i f6",  // or any other combo
    "command": "extension.commandvariable.setClipboard",
    "args": { "text": "This is the new clipboard content" }
  }
  • Related