Disable keyboard shortcuts

Is there any way to disable keyboard shortcuts programmatically, so that I don’t have to select Control>Disable Keyboard Shortcuts in the .swf file?

Thanks!