Search code examples
3dsmaxregisterhotkey

Adding 3ds max hotkey binding through kbdx file


Let's say that I've got a bunch of custom macros I've loaded into 3ds max and would like to assign hotkey bindings to them. I'd be able to do this programmatically in case I add more.

I start off with assigning "A" to a script I called "A":

enter image description here

This is what gets exported in the kbdx file:

<?xml version="1.0" encoding="utf-8" ?>
<ADSK_KBD>
    <shortcut fVirt="3" accleleratorKey="65" actionID="A`DragAndDrop" actionTableID="647394" />
</ADSK_KBD>

I add bindings for the next two:

enter image description here

This is what appears in the kbdx file, now:

<?xml version="1.0" encoding="utf-8" ?>
<ADSK_KBD>
    <shortcut fVirt="3" accleleratorKey="65" actionID="A`DragAndDrop" actionTableID="647394" />
    <shortcut fVirt="19" accleleratorKey="65" actionID="AltA`DragAndDrop" actionTableID="647394" />
    <shortcut fVirt="19" accleleratorKey="66" actionID="AltB`DragAndDrop" actionTableID="647394" />
</ADSK_KBD>

There doesn't seem to be pattern and looks like the kbdx file is just a reflection of some internal 3DS Max datastore for hotkeys/bindings.

I've tried binding AltC by copying the last line and replacing 'AltB' with 'AltC'. AltC gets bound to Alt+B, which makes sense. There doesn't seem to be a way to tell Max I want to use "Alt+C" for the AltC action.

Is adding 3ds max hotkey bindings through this file possible? If so, how's it done?


Solution

  • There doesn't seem to be a way to tell Max I want to use "Alt+C" for the AltC action.

    So, did you change the accleleratorKey value to 67, the ASCII code for C?