Display.post

Generate a low level system event.

<code>post</code> is used to generate low level keyboard and mouse events. The intent is to enable automated UI testing by simulating the input from the user. Most SWT applications should never need to call this method. <p> Note that this operation can fail when the operating system fails to generate the event for any reason. For example, this can happen when there is no such key or mouse button or when the system event queue is full. </p> <p> <b>Event Types:</b> <p>KeyDown, KeyUp <p>The following fields in the <code>Event</code> apply: <ul> <li>(in) type KeyDown or KeyUp</li> <p> Either one of: <li>(in) character a character that corresponds to a keyboard key</li> <li>(in) keyCode the key code of the key that was typed, as defined by the key code constants in class <code>SWT</code></li> </ul> <p>MouseDown, MouseUp</p> <p>The following fields in the <code>Event</code> apply: <ul> <li>(in) type MouseDown or MouseUp <li>(in) button the button that is pressed or released </ul> <p>MouseMove</p> <p>The following fields in the <code>Event</code> apply: <ul> <li>(in) type MouseMove <li>(in) x the x coordinate to move the mouse pointer to in screen coordinates <li>(in) y the y coordinate to move the mouse pointer to in screen coordinates </ul> </dl>

@param event the event to be generated

@return true if the event was generated or false otherwise

@exception IllegalArgumentException <ul> <li>ERROR_NULL_ARGUMENT - if the event is null</li> </ul> @exception SWTException <ul> <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li> </ul>

@since 3.0

class Display
bool
post

Meta