Keyboard Shortcut

Keyboard Shortcut

Anonymous
Not applicable
2,023 Views
7 Replies
Message 1 of 8

Keyboard Shortcut

Anonymous
Not applicable

Hello to the group!

Is there any more shortcut key than the hotkeys provided, or it is possible to create some user defined keys?

I work a lot with the Align to Target tool and it was very nice if I have shortcut for it!

Thanks

2,024 Views
7 Replies
Replies (7)
Message 2 of 8

hfcandrew
Advisor
Advisor

'n' for align to target

 

 1) If you want to make some custom hotkeys it is a bit of work around but it can be done using python and the mmapi.

2) See the Win10 thread from last week for getting that working.

3) In a powershell input: pip install keyboard.  This will install a python library that 'listens' to keyboard inputs in windows globally.

4) Write code to run an mmapi tool/function/command everytime that key is press. Hint: stick to the 'F_' keys"

   Obviously largely depending on how you make your your code it should look something like:

 

import keyboard

keyboard.add_hotkey('F2', lambda: #############...)

0 Likes
Message 3 of 8

Anonymous
Not applicable

Are you aware of the KeyboardShortcuts entry in the Help menu?

The you'll find most of the available Hotkeys...

0 Likes
Message 4 of 8

Anonymous
Not applicable

Thank you for your response, and I'm aware of the Hotkeys.

The (n) Align tool provided is not for the Align To Target, that was what I want to shortcut. Or... something is missing to me. 

0 Likes
Message 5 of 8

Anonymous
Not applicable

Thank you sir!

The "n" don't work for Align To Target, or ... I'm doing something wrong.

I'm not use to work with more advanced programming 😜, but with your advice and information, I give it a try!! 😉

Thanks

0 Likes
Message 6 of 8

hfcandrew
Advisor
Advisor

No I don't think there is a default hotkey for 'align to target'.

 

To can set your target with ` though. Saves having to bring up the object browser.

0 Likes
Message 7 of 8

Anonymous
Not applicable

@hfcandrew wrote:

No I don't think there is a default hotkey for 'align to target'.

 

To can set your target with ` though. Saves having to bring up the object browser.


Hello Andrew. Thanks again for you response. I am very interested and learning to do by myself the hotkey for it, as it yours first post.

Makes me curious what you intend with "target with ` though".

Thanks

0 Likes
Message 8 of 8

hfcandrew
Advisor
Advisor

If you are using the 'align to target' command after making a selection. You have to have another object set as the target. the hotkey to set a target is `   or    ~    which is beside the 1 key.

 

Take make custom hot keys is far more complicated. Need to set up the mmapi to run a command (align to target) allowed by the mmapi, then globally set a python library to 'watch out' for when that key is pressed. And when it is pressed, if the proper MM conditions are satisfied (a selection has been made) then attempt to run the command.

 

Follow these instructions: https://forums.autodesk.com/t5/meshmixer/mmapi-on-windows-10/td-p/9277543

 

Once to can get the mmapi to plane cut the bunny then report back to me.

0 Likes