Keyboard Shortcuts Don't Work
I'm hoping I can explain this clear enough, I know I'm missing something, but I'm completely stumped.
Here is the symptom:
- When working in structured view, selecting an element and then using the keyboard shortcut for copy (Ctrl+C) does not work. I get a beep. While the right click menu - Copy does work. Same applies to the keyboard shortcuts for cut, copy, paste, and even the delete key.
- If I click on the desktop, then back to the structure window on an element, it will work one time. For example I can copy the element. Then I have to click on the desktop and back in the structure window where I want to insert the element.
- Another odd behavior is that when this occurs, pressing a single key on the keyboard has the same result as using the Alt+key, but there is no underscore in the menu letters. For example, pressing V drops down the view menu as if I pressed Alt+V. The underlined letters in the menu for the shortcuts do appear when I press the Alt key.
- UPDATE: When the Structure View panel is docked, keyboard shortcuts work. When the Structure View panel is undocked or iconified and expanded, the keyboard shortcuts do not work with the script enabled.
The ExtendScript automates inserting multiple "Model" elements with a specific alpha-numeric value in the "ModelNumber" attribute. There can be anywhere from 1 to 100 or more unique models inserted. The document is a parts manual. Each manual has a list of models it covers, each assembly can include all or any combination of models, and each part in that assembly can contain all or any combination of models applied to the assembly.
When the user inserts, pastes, or double-clicks on a specific container element, a window opens with a list of all the available model numbers that can apply. The user checks off those model numbers to include and then clicks a button to insert a "Model" element with the "ModelNumber" attribute value set for each model the user checked off.
The ExtendScript monitors FA_Note_PreMouseCommand, FA_Note_PostMouseCommand, FA_Note_PostInsertElement to determine the location in the structure and document, and the type of mouse action to determine whether it should load the model numbers to check-boxes and open the window.
A menu is created when the script runs with some commands to refresh the list model numbers, looks for invalid model numbers and generates a report, and enables/disables the notify so the window doesn’t open and doesn’t actively read/load the list of model numbers. The enable/disable command utilizes the check-mark to indicate whether it's enabled or disabled.
When the script is disabled, keyboard shortcuts work fine.
What would cause the keyboard shortcuts to not work, yet mimic the Alt key being pressed? The window, the menu, the notify functions?
Why would the Structure View panel being docked or undocked have any impact on the keyboard shortcuts? Or how would that conflict with the model window?
Any help or direction will be greatly appreciated.
Trent Schwartz
