Key bindings not binding
Hi -- I purchased the Pro upgrade and edited my default.keybinding
file to add the following:
{
"comment" : "toggle preview",
"key": "0",
"modifiers": ["cmd", "shift", "opt"],
"action": [
"togglePreview:"
]
}
I also checked the "Use keybindings to update menu bar shortcuts" box in the Pro preferences pane, and then restarted MMC. But Cmd-Shift-Option-0 does not toggle preview. I also tried Cmd-Shift-P, but that continues to run Print Preview. What am I missing?
Also, is it possible to define keyboard shortcuts using the Enter key (my normal preview-toggle keyboard shorcut is Cmd-Enter)?
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by 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!Fletcher closed this discussion on 19 Sep, 2021 02:20 PM.
Ken re-opened this discussion on 21 Sep, 2021 12:59 PM
2 Posted by Ken on 21 Sep, 2021 12:59 PM
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:
Support Staff 3 Posted by Fletcher on 21 Sep, 2021 04:20 PM
You're using "option", when the correct value is "opt".
The documentation is here --
http://support.multimarkdown.com/kb/composer-v4/custom-key-bindings-and-macros
It's worth taking a look at if you're having trouble.
Fletcher
4 Posted by Ken on 22 Sep, 2021 09:01 PM
Thanks, I missed that. But originally I was trying to set it to Cmd-Enter. If I set the key to
\\\U000A
(or\\U000d
) I get Cmd-backslash as the combination. What should I use for the Enter key?Support Staff 5 Posted by 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.)
Fletcher