#

## pushbutton

Emulate a mouse button event.

### Usage:

> pushbutton button action

> > where button is one of left, middle, or right, and action is is one of up or down.

### Summary:

> The pushbutton command is a way of invoking the actions associated with mouse buttons from the command-line, or from a Tcl script.

### Implementation Notes:

> pushbutton is implemented as a built-in window command in magic. However, it is functionally equivalent to calling the Tk function event generate.

### Bugs:

> This is all backwards! There should be commands implemented to generate the actions that are caused by button pushes in each tool, and these commands should be bound to the button events. Presumably the existing setup is a holdover from pre-X11 days.

Return to command index

Last updated: October 8, 2004 at 12:44am