Staging: this is not the live site, pydocs.org.
Graphical user interfaces with Tk
A container for the attributes of an event passed to a callback bound with Misc.bind(). An Event instance has the following attributes, each corresponding to a field of the underlying Tk event; depending on the event type, some attributes may be set to the string '??' to indicate that they are not meaningful. See Bindings and events. Members of Event c char The character typed, as a string (for key events). d delta The amount the mouse wheel was rotated (for MouseWheel events). detail A fixed detail string for Enter, Leave, FocusIn, FocusOut and ConfigureRequest events (see the Tcl/Tk documentation). f focus Whether the window has the focus (for Enter and Leave events). h height The new height and width of the window (for Configure and Expose events). k keycode The keycode of the key that was pressed or released. keysym The symbolic name of the key that was pressed or released. n num The mouse button that was pressed or released (for button events). s send_event True if the event was sent by another application. serial The serial number of the event. state The state of the event, as a number (for most events) or a string (for Visibility events). t time The timestamp of the event, in milliseconds. type The EventType of the event. u user_data The data string of a virtual event, as passed to the data option of Misc.event_generate(). w widget The widget on which the event occurred. width The new height and width of the window (for Configure and Expose events). x x The pointer position relative to the widget, in pixels. x_root The pointer position relative to the top-left corner of the screen, in pixels. y y The pointer position relative to the widget, in pixels. y_root The pointer position relative to the top-left corner of the screen, in pixels.
Python docs © Python Software Foundation · Examples CC0 ·
Source on GitHub · Not affiliated with the PSF