send-key -- Send a synthetic press/release of KEY.


(send-key key #&optional win key-press? key-release? propagate?)


Send a synthetic press/release of key. The usual key specification format (with modifiers) is used. The event is sent to window win if specified; otherwise the window to be used defaults to the window context in the usual way. By default, both a press and a release are sent. However, the boolean parameters key-press? and key-release? allow you to specify which are sent individually. propagate? indicates whether the propagate flag is set on the event; the default is #f. You should not have to worry about this unless you know what it means.

Implementation Notes

Module: Built-in Primitive

Defined in src/events.c at line 2237 (CVS log)