vscode-which-key icon indicating copy to clipboard operation
vscode-which-key copied to clipboard

`bindings` vs `bindingOverrides` and `keys` vs `key`

Open TwoClocks opened this issue 2 years ago • 3 comments

As I've been adding more overrides, at some point I've made enough changes that I just want to skip the defaults. I'd assumed I just needed to change bindingOverrides to bindings and it would work. It doesn't. I needed to go and change all the group bindings from keys to key.

It would be nice to just be able to flip back and forth at will.

Maybe this is a feature request, and not a bug.

TwoClocks avatar Apr 06 '23 21:04 TwoClocks

bindings is used to define the whole menu and bindingOverrides is designed to surgically update a few bindings (that's why it has keys). I agree that it could be better/seamless. Any idea?

stevenguh avatar Apr 08 '23 21:04 stevenguh

So, my two cents: Change all the docs to change any reference to 'keys' to 'key' Change the code that parses the BindingOverrides to look for either 'key' or 'keys' (stay backwards compatible)

Having never looked at the code, maybe now you can use the same parsing code for both?

TwoClocks avatar Apr 12 '23 08:04 TwoClocks

Thanks for the suggestions. There some nuances for the overrides. In hinge sight, it is poorly defined API. Supporting both key and keys may help in this case. I feel like the whole overrides may need to overhaul.

stevenguh avatar Jul 25 '23 04:07 stevenguh