The event command provides several facilities for dealing with window system events, such as defining virtual events and synthesizing events. The following operations are defined:
- event add
Add the given event
sequences to those associated with the virtual event
virtual. The virtual event will trigger whenever any one of the given
sequences occurs. See the bind command for allowed
- event delete
Delete the given event
sequences from those associated with the virtual event
virtual. If no
sequenceis given, all sequences associated with the virtual event are removed.
- event generate
Generate an event for window
windowand arrange for it to be processed just as if it had come from the window system.
Windowmay be a window pathname or an identifier (as returned by winfo id), as long as it is in the current application. The
sequenceargument describes the event to generate. It may have any of the forms allowed for the
sequenceargument to the bind command, except that it must consist of a single event pattern (e.g., <
Shift-Button-2> or <<
The event generated can be further described with the optional optionvalue pairs. In the descriptions of these options that follow, the [%
char] at the beginning identifies the corresponding bind command substitution. The available options are as follows:
%a] The above field for ...
- event add <<