Keyboard Shortcut

Keyboard Shortcut

brad.bylls
Collaborator Collaborator
1,533 Views
3 Replies
Message 1 of 4

Keyboard Shortcut

brad.bylls
Collaborator
Collaborator

I have assigned a shortcut key to a menu item for an add-in I created.

The add-in is checked to run on startup.

When I start Fusion360 again, the shortcut is gone.

Is there a way to keep the shortcut?

Untitled.jpg

 

 

 

 

 

 

Brad Bylls
0 Likes
Accepted solutions (1)
1,534 Views
3 Replies
Replies (3)
Message 2 of 4

BrianEkins
Mentor
Mentor

I don't know what the difference could be but I just tried adding a shortcut to one of my add-in commands and after re-starting Fusion, the shortcut is still available.  I don't know if it's add-in specific somehow or what the problem could be.  Can you try it with an add-in on the App Store so then we can test it with the same thing?

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 4

brad.bylls
Collaborator
Collaborator
Accepted solution

Brian,

I loaded Patrick Rainsberry's "Sheeter" add-in and added a shortcut to one of the menu items.

It did not come back when I started Fusion again.

However, It does not show up on the menu, but it is active. (I didn't try that before)

When I press Shift + C, the menu item works.

Tried it on my code and get the same thing.

It works, just doesn't show up on the menu.

 

Brad Bylls
0 Likes
Message 4 of 4

kandennti
Mentor
Mentor

Hi @brad.bylls .

 

Here is how to get a list of registered keyboard shortcuts (hotkeys) that I know of.

 

Run the following text command

HotKey.Export

This will export the list in json format.

 

For the exported file, run the following text command

Paths.Get

You will see a lot of paths, but look at the "cloudCacheDirectory" folder.

 

You can use @JeromeBriot  add-in "Fusion 360 Open folders" to easily open the folders.

https://github.com/JeromeBriot/fusion360-open-folders 

 

The file "hotkey.json" in the folder is a list of Hotkeys.
Make sure that the CommandID you want to check is in this file.

 

 

Also, I haven't checked, but when you execute the addButtonDefinition method, do you set the resourceFolder?

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-04eb6198-72cd-4430-a6a4-8d68a1105b8e 
If not, you may not be able to register it with Hotkey because it cannot be pinned.

0 Likes