Is there a way to run scripts with a keyboard shortcut?

I have a script that only requires selecting an element, and I use it many times throughout the day. I know I can run it from the player, but I was wondering if it’s possible to assign it a keyboard shortcut.

Anything is possible, but depending on what the Dynamo graph does you might be better off converting it to a new means of execution (i.e. an add-in) as the speed via player will likely match the speed via keybinding.

Hi @yinodo2737 ,

It’s been a while since I worked specifically on this, if I remember correctly, using PyRevit you can also add buttons that directly point at Dynamo graphs, and (if I remember correctly here as well) you can make those also have key binds.

But maybe this is a bit of a convoluted way to do this. Yet, I am 100% sure that what you’re asking is possible, except I cannot give you a good direction, but if you Google it/ search on the forum I’m pretty sure you’ll figure out a way.

yeah and if i remember and probably wrong Orchestra have that option as well where we can create hotkeys,ps havent check right now so…

Ah yea likely Orchestra instead of PyRevit :slight_smile:

Yes, I’ve used Orchestra for Dynamo, and it does allow you to assign keyboard shortcuts to specific scripts, which is very useful. However, it’s a paid solution.

Alternatively, I would recommend pyRevit, which is free and also provides flexible options for running scripts, including custom buttons and shortcuts.

Hi @_Vijay probably right, but last time i checked it should be a part of the unpaid option i dont use that in the moment…so…and about pyrevit i dont use it…so not really sure :wink: but for sure possible one way or another…as we say :wink: :wink:

With Relay it is also possible you have to assign an key board shortcut to the script.

Thanks for the idea I did not think about it earlier.

I don’t think anyone should be recommending this tool until the IronPython2 component is complete removed. You’re putting a lot of risk into the environment otherwise.