ActiveX - Disable 3ds Max keyboard accelerators



Your Ad Here

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.

A MAXScript 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 accelarators:

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

ms_ActiveX04.gif

Note:

There is no real way of determing when an activeX control got focus and when it lost it and automatically disable/enable Max's accelarators. It's upto 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

Return to Autodesk Index

Your Ad Here