Intercepting commands executed by keyboard shortcuts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I understand that I can create eventhandlers on Autodesk.Windows.ComponentManager.PreviewExecute and Autodesk.Windows.ComponentManager.ItemExecuted to be notified when a command is just about to start from a ribbon button, and when the exectuion of that command just finished. However I realized that these events are not being fired when those commands are executed via keyboard shortcuts. Both commands executions are logged into the journal file as Jrn.Command, and there is also a differentiation wether it was a ribbon button click, or a keyboard shortcut (Jrn.Command "KeyboardShortcut" , "Create a wall , ID_OBJECTS_WALL" and Jrn.Command "Ribbon" , "Create a wall , ID_OBJECTS_WALL" )
I would like to know if there is any direct way to catch these events of using keyboard shortcuts, or my only real option would be to track the journal file continously, and act if a newly created line includes "KeyboardShortcut"? I wouldn't really like that option because it is ugly and seems to be resource heavy.