Fletcher on 19 Sep, 2021 02:20 PM
You're specifying the action as an array of steps, but it's only a single step and you want it to match a menu bar item. Change the "action" value from an array to just "action" : "togglePreview:" That should do it!
Hi Fletcher, thanks for the response, but I'm sorry to say it doesn't seem to work. I've modified as you suggested and still nothing. The menu does not show the shortcut for Toggle Preview, and the key combination does nothing. Here's my complete default.keybinding:
Fletcher on 24 Sep, 2021 12:49 AM
I'm not sure what the string used for specifying the Enter key is for
the macOS. I was able to find the others through Google.
But if all you are doing is specifying shortcuts for menu items, then
the easiest way is probably to use the keyboard system preferences.
This allows you to set shortcuts for any application on your computer,
and to do it using a GUI interface.
The keybinding file is intended for adding new commands, or for creating
more complex commands using a series of actions. It's pretty powerful,
but does require some experimenting to accomplish what you're looking
for sometimes. It's a bit cumbersome if you're simply overriding menu
command shortcuts (unless you're trying to copy a custom configuration
to multiple machines, I suppose.)