i just wonder if i can make script shortcut via script itself, instead of going to (edit > keyboard shortcuts) especially i have dozens of scripts, and this task is tedious to go there everytime i need a shortcut, i know i can call quick apply and search for the script but this is also time cosuming!, i just ask if this possible and thanks in advance.
I don't think that is possible as I could not find any API to do this. You may try hacking the indk file(it's a XML file) for a shortcut set to see if you can add entries to it. There exists an API to load a shortcut set so you can try this and see if you are able to get something working. The location of the indk file on a MAC is as follows
<User directory>/Library/Preferences/Adobe InDesign/Version 16.0/en_GB/InDesign Shortcut Sets
Any new shortcut set you create creates a new indk file in this folder
Thanks a lot @Manan Joshi
in windows its located in
C:\Users\<User Name>\AppData\Roaming\Adobe\InDesign\Version 17.0-ME\en_AE\InDesign Shortcut Sets
Version 17.0-ME is InDesign 2022 ME Version - it might different depending on version installed or you may install multiple versions.