MAXScript Tools and Interaction with 3ds Max > Creating MAXScript Tools > ActiveX Controls in MAXScript Rollouts >

# ActiveX - Disable 3ds Max keyboard accelerators

Note

ActiveX Controls have been deprecated by Microsoft in the latest versions of the Windows operating system in favor of the DotNet framework and its controls.

While MAXScript still supports ActiveX controls, these have to be installed and registered on the system to be accessible to MAXScript.

As a replacement of ActiveX controls, MAXScript supports DotNet controls in 3ds Max 9 and higher.

For most of the ActiveX controls there is no automatic way of determining if it supports keyboard input to disable the 3ds Max keyboard accelerators.

AMAXScript system global called "enableAccelerators" can be set to false whenever an ActiveX control gets focus so that the user can type in the controls.

Here is a sample that can be handy to enable/disable keyboard accelerators:

EXAMPLE
    rollout rAccelState "State"
    (
      checkButton accelState "Test"
      on rAccelState open do
      (
        accelState.text = if (enableAccelerators) then "Enabled" else "Disabled"
        accelState.checked = enableAccelerators
      )
      on accelState changed state do
      (
        enableAccelerators = state
        accelState.text =if (enableAccelerators) then "Enabled" else "Disabled"
      )
    )
    nf = newRolloutFloater "" 100 100
    addRollout rAccelState nf

Note

There is no real way of determining when an activeX control got focus and when it lost it and automatically disable/enable Max's accelerators. It's up to the script writer's discretion to find a clever way to disable them. There is a "on StatusTextChange ..." event handler to disable the accelerators, but it is not fail-proof.

    on ax StatusTextChange txt do enableAccelerators = false

#### See Also

- ActiveX Controls in MAXScript Rollouts