Copy link to clipboard
Copied
Hi All,
Is it possible to remove shortcut from paragraph styles with script.
Thanks,
Shonky
It's not listed in the ESTK Help, which suggests "No".
Copy link to clipboard
Copied
It's not listed in the ESTK Help, which suggests "No".
Copy link to clipboard
Copied
Thanks again Jongware,
But there is not any other solution to remove shortcut without manually removing it?
Shonky
Copy link to clipboard
Copied
I'd agree with Jong, that it's not possible.
I don't know where the shortcuts are stored. If they are stored in a
text file, you could edit that file. I'm pretty sure that style
shortcuts are stored in the document though...
Harbs
Copy link to clipboard
Copied
A real shortcut in the sense of KBSC is implemented using the menu and action subsystem.
The style's shortcut is no such shortcut, the styles just store the virtual key (internal numbering of the keys, before any character is known) and a timestamp (for priorization of competing styles) in the document straight within their persistent data.
The SDK's IDML documentation knows a "kKeyboardShortcutPropertyScriptElement" which is hidden from the regular scripting languages.
ScriptID='kbsc', Name = "keyboard shortcut", Description = The keyboard shortcut for the style, Data Type = Array of 2 Short Integers.
Maybe you get lucky if you export a snippet with the style, strip that attribute and re-import.
Eventually it also works in AppleScript, if you artificially create such a script ID (left as an exercise) associated with a {0,0} array and assign that to the properties property of the style.
Dirk
Copy link to clipboard
Copied
Now it is clear that remove shortcut not possible with Javascript.
Shonky
Find more inspiration, events, and resources on the new Adobe Community
Explore Now