|
4 | 4 | Events are simple dict objects containing at least the key `event_type`. |
5 | 5 | Additional keys provide more information regarding the event. |
6 | 6 |
|
7 | | -*Last update: 24-10-2023* |
| 7 | +*Last update: 09-05-2025* |
8 | 8 |
|
9 | 9 | Event types |
10 | 10 | ----------- |
|
125 | 125 | Event capturing |
126 | 126 | --------------- |
127 | 127 |
|
128 | | -Since jupyter_rfb represents a widget in the browser, some events only |
129 | | -work when it has focus (having received a pointer down). This applies |
130 | | -to the *key_down*, *key_up*, and *wheel* events. |
| 128 | +The *pointer_move* event only occurs when the pointer is over the widget, |
| 129 | +unless a button is down (i.e. dragging). The *pointer_down* event can only |
| 130 | +occur inside the widget, the *pointer_up* can occur outside of the widget. |
| 131 | +
|
| 132 | +Some events only work when the widget has focus within the application |
| 133 | +(i.e. having received a pointer down). |
| 134 | +This applies to the *key_down*, *key_up*, and *wheel* events. |
| 135 | +
|
| 136 | +
|
| 137 | +Application focus |
| 138 | +----------------- |
| 139 | +
|
| 140 | +(In the case of ``jupyter_rfb``, the 'application' typically means the browser.) |
| 141 | +
|
| 142 | +* When the application does not have focus, it does not emit any pointer events. |
| 143 | +* When the application loses focus, a *pointer_leave* event is emitted, and |
| 144 | + also a *pointer_up* event if a button is currently down. |
| 145 | +* When the application regains focus, an enter event is emitted if the pointer |
| 146 | + if over the canvas. This not may happen until the pointer is moved. |
| 147 | +* If the application regained focus by clicking on the canvas, that click does |
| 148 | + not result in pointer events (down, move, nor up). |
131 | 149 |
|
132 | 150 |
|
133 | 151 | Event throttling |
|
0 commit comments