actboy168 / vscode-tasks

MIT License
37 stars 14 forks source link

Keyboard shortcuts stoped working for Tasks #17

Closed IvanRublev closed 4 years ago

IvanRublev commented 4 years ago

Keybindings were set to run taskboy168.task.X commands.

After update to VSCode 1.45.0 pressing a set keybinding causes a 'command actboy168.task.X' not found error.

How it's possible to fix this?

The tasks configuration file was used tasks.json.zip

About VSCode
Version: 1.45.0
Commit: d69a79b73808559a91206d73d7717ff5f798f23c
Date: 2020-05-07T15:57:33.467Z
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 17.7.0
image image
actboy168 commented 4 years ago

actboy168.task.X is used in tasks0.4 or lower. After tasks0.5, only actboy168.run-task was used. It may be because you still have low version tasks or VSCode did not clean it up properly.

IvanRublev commented 4 years ago

What is the proper way to attach a keyboard shortcut to a task in tasks0.5?

actboy168 commented 4 years ago

After a84f0419e2b88b6cc8563ee18c7492b597a3937d, you can do it to it:

  1. Open the keybindings.json file from the Command Palette (Ctrl+Shift+P) with the Preferences: Open Keyboard Shortcuts (JSON) command.
  2. Add
    [
    {
        "key": "ctrl+shift+z",
        "command": "actboy168.run-task",
        "args": 1
    }
    ]

    This is equivalent to the actboy168.task.0 .

IvanRublev commented 4 years ago

Thanks a lot it works and that is amazing 🤩