The mouse button actions can be edited in the CUI file. Under the section MouseButtonRoot , four sections are found, with alias 'AUX1' to 'AUX4'. The meaning of these groups is:
- AUX1: clicks without modifier
- AUX2: Shift-clicks
- AUX3: Ctrl-clicks
- AUX4: Ctrl-Shift-clicks
Within the group, there's a number of elements. BricsCAD will only use the first two of them. The first item defines the action for the right mouse button, the second one is for the middle button. The left mouse button behavior is fixed, it cannot be customized.
When the has its attribute BlankLine set to true, the corresponding button will execute the default action (like in previous versions). Otherwise, its MenuMacro action will be executed.
The SHORTCUTMENU, MBUTTONPAN and CTRLMOUSE system variables affect the behavior of the CUI ButtonItems!
- SHORTCUTMENU is a combination of bit-flags for different context menus (Default, Edit, Command). When the corresponding bit is on, right-clicks without Shift modifier will display the built-in context menu and ignore the cui ButtonItems.
- MBUTTONPAN: if this is on, middle-click without modifier will execute the built-in realtime pan function.
- CTRLMOUSE: if this is on, Ctrl-right-click will execute realtime Z-axis-rotation; Shift-Ctrl-right-click will execute realtime pan.
BricsCAD uses the MouseButtonRoot and DoubleClickRoot sections in the CUI file.
In the MouseButtonRoot section, you can define the actions to call when the middle or right mouse button is pressed. The DoubleClickRoot section defines the actions to call when entities of a certain type are double-clicked upon.
How to customize the right and middle mouse buttons?