Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Is it possible to create and select sets of shortcuts using a script or the C++ SDK?

Engaged ,
Nov 04, 2025 Nov 04, 2025

The C++ SDK does contain relevant documentation, but
For example

 

IKBSCSetsManager::KBSCArea IShortcutManager::GetShortcutKBSCArea()

 

I don't know how to operate the IKBSCSetsManager. How do I obtain the interface?

TOPICS
Scripting , SDK
273
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 04, 2025 Nov 04, 2025

Hi,

 

I have never tried creating the shortcuts from the code, but you can get the access IShortcutManager.

IShortcutManager belongs to kActionManagerBoss.

 

InterfacePtr<ISession> iSession(::GetExecutionContextSession(), UseDefaultIID());
InterfacePtr<IApplication> iApplication(iSession->QueryApplication());
InterfacePtr<IActionManager> iActionManager(iApplication->QueryActionManager());
InterfacePtr<IShortcutManager> iShortcutManager(iActionManager, UseDefaultIID());

// Now you can use iShortcutManager

 

- Rahul Rastogi

Adobe InDesign SDK C++ Custom Plugin Solution Architect

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 04, 2025 Nov 04, 2025

Thank you.
Assuming IShortcutManager has been obtained,
how do I obtain IKBSCSetsManager?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 04, 2025 Nov 04, 2025

IKBSCSetsManager belongs to kWorkspaceBoss

 

InterfacePtr<ISession> iSession(::GetExecutionContextSession(), UseDefaultIID());
InterfacePtr<IWorkspace> iWorkspace(iSession->QueryWorkspace());
InterfacePtr<IKBSCSetsManager> iSetsManager(iWorkspace, UseDefaultIID());

// now, you can use iSetsManager
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 04, 2025 Nov 04, 2025

Thank you so much, I'm glad I asked.

 

I'd like to send money to you, just like how viewers can send money to streamers on YouTube.
I'd like you to add that kind of feature to the community...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 06, 2025 Nov 06, 2025

The IKBSCSetsManager interface contains the notethis interface is deprecated.
@SEE IShortcutManagerand the method did not function properly.
(Displaying the shortcut dialog once resolves the issue)

 

The IShortcutManager interface does not appear to have a replacement for the SwitchToSet method of IKBSCSetsManager.

 

Is it currently impossible to select a shortcut set?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Nov 09, 2025 Nov 09, 2025

If I remember that correctly, you need a command where the CmdData is missing in the SDK.

There is a way via scripting, though.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 09, 2025 Nov 09, 2025

Thank you.
I'll create a new question about the method using scripts and ask everyone.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Nov 09, 2025 Nov 09, 2025

Sorry for the unspecific response, I was away from my working machine.

 

The command is kKBSCSetCurrentSetCmdBoss, the missing interface is IID_IKBSCSETCURRENTSETCMDDATA.

This does not help with anything though because of missing header for the CmdData as I remembered. As far I have looked there is also no notification.

 

"Displaying the shortcut dialog once solves …" - that's typical, InDesign setter methods are often very raw and only manipulate direct data. Calling them directly misses required database updates and also any dependencies. Such functionality mostly goes thru commands, or facade and util methods.

 

For the scripting side, here another screenshot:

DirkBecker_0-1762760518436.png

The entry in general preferences just repeats the property name, likely it is the applied shortcut set.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 10, 2025 Nov 10, 2025

So it's not possible in C++ but can be done in Script, huh? I see things like this happen too.
Thank you for your thoughtful reply.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Nov 10, 2025 Nov 10, 2025

C++ can call scripts, or directly invoke script requests.

It is just unneccessary overhead, e.g. a day or two to get it going for the first time.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Nov 10, 2025 Nov 10, 2025
LATEST

The world of the C++ SDK is endlessly deep and vast.

I intend to proceed step by step.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines