Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow key bindings to use arguments for commands #58

Open
rioj7 opened this issue Sep 24, 2021 · 1 comment
Open

Allow key bindings to use arguments for commands #58

rioj7 opened this issue Sep 24, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@rioj7
Copy link

rioj7 commented Sep 24, 2021

The toggle commands do not use the arguments set in a key binding.

  {
    "key": "ctrl+i t",
    "command": "settings-toggle.toggle-workspace",
    "args": {
      "action": "set",
      "setting": "workbench.colorTheme",
      "value": "Default Light+"
    }
  }

Possible values for action:

  • toggle : toggle the current value
  • set : set the settings to the value given in property value (string, boolean, number, array, object)
  • reset or default : revert to default value
  • ....... : something I didn't think of
@z0al z0al added the enhancement New feature or request label Oct 3, 2021
@z0al
Copy link
Owner

z0al commented Oct 3, 2021

Great suggestion @rioj7 . I was not aware it's possible to pass args to commands when defining keybindings.

This shouldn't be hard to implement but I'm quite busy these days so won't be able to tackle it soon. If you want to open a PR by all means go ahead, I'd appreciate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants