Arbortext Command Language > Functions by Alphabetical Listing > current_event
  
current_event
current_event ([detail])
This function returns information about the event that caused the command script containing this function call to be executed. The return value is one of the strings below. If the detail parameter is specified, additional details will be provided about the event.
key — a key is pressed. detail is the name of the key, for example, Ctrl+Shift+F3.
toolbar — a toolbar button is pressed. detail is the name of the toolbar button, for example, Toolbar_Save.
mouse — a mouse button is pressed. detail is the name of the button, for example, Ctrl+M1.
menu — a menu is selected. detail is the name of the menu item, for example, Save As....
scroll — a scrollbar event is active. detail is null.
other — some other event is active. detail is null. Scripts are unlikely to get this return value.
none — no event is active. For example, the script is run outside of Windows mode. detail is null.
This function is useful to make a command behave differently depending on whether it is mapped to a key or menu.
Related Topics
map command