You can program mouse buttons to execute a specific command from the Command Line Syntax. After the buttons are set up, a certain command can be invoked by clicking the appropriate mouse button. Note that this applies only to mouse clicks - not to commands issued when holding down a mouse button (currently this applies only to panning).
By default, EPIC defines the following mapping.
for a 3-button (UNIX workstation) mouse.
Left button | Select |
Middle button | Zoom in |
Right button | Zoom out |
for a 2-button (PC) mouse.
Left button | Select |
Right button | Zoom in |
Right button + Shift | Zoom out |
To remap mouse buttons you must alias a mouse button event code to an EPIC command. You create an alias for the button in the epic.ini or epicuser.ini file (for a description of these files, see the section titled Initialization Commands). Event codes and their default EPIC command mapping are shown in the table below.
Mouse Button | Event Code | UNIX (3-button) | PC (2-button) |
---|---|---|---|
Left | 0x202 | pick | pick |
Left + Shift | 0x205 | pick -s;pick -e | pick -s;pick -e |
Left + Control | 0x206 | pick -m | pick -m |
Middle | 0x208 | zoom in | N/A |
Middle + Shift | 0x20b | null | N/A |
Middle + Control | 0x20c | null | N/A |
Right | 0x20e | zoom out | zoom in |
Right + Shift | 0x211 | null | zoom out |
Right + Control | 0x212 | null | null |
Create the alias in the epic.ini file in the following format.
alias event_code command_name
For example, to switch the positions of the zoom out and zoom in buttons for a 3-button mouse, you would enter.
alias 0x208 zoom out
alias 0x20e zoom in
To map the getattr command to the left + control mouse button, you would enter.
alias 0x206 getattr
With the above alias, any time you click the left mouse button when the control key is also held down, you will get the attributes for the currently selected object.
If you unalias a remapped mouse button, EPIC will restore the default command to that mouse button.