bootstack.events.Event#
- class bootstack.events.Event(widget=None, x=0, y=0, x_root=0, y_root=0, width=0, height=0, delta=0, ctrl=False, shift=False, alt=False, meta=False, key='', char='', time=0)#
Bases:
objectThe object a handler receives for native and context events.
Native events carry no application payload — pointer clicks, hover, focus, blur, resize, key presses, and scrolling. For those, the handler bound with
on_*()receives this curatedEvent: where the pointer was, the size of the widget, which modifier keys were held, and (for keyboard events) which key. Events that do carry data —change,input,select— hand the handler a typed payload object instead (see the rest of this module).The fields are deliberately modern: modifier keys are plain booleans (
ctrl,shift,alt,meta) and the key is a cleankeystring, with none of the low-level bitmask or serial-number plumbing of the underlying toolkit.