Open psobolewskiPhD opened 2 months ago
Expand this section: https://napari.org/dev/howtos/extending/connecting_events.html#listening-for-keypress-events
To also include an example using a layer, e.g. Image.bind_key -- this will fire on a selected Image layer Or even a specific layer, like viewer.layers['my layer'].bind_key -- this will only fire if that layer is selected
viewer.layers['my layer'].bind_key
It may be worth updating the example (https://github.com/napari/napari/blob/main/examples/custom_key_bindings.py) as well.
🧰 Task
Expand this section: https://napari.org/dev/howtos/extending/connecting_events.html#listening-for-keypress-events
To also include an example using a layer, e.g. Image.bind_key -- this will fire on a selected Image layer Or even a specific layer, like
viewer.layers['my layer'].bind_key
-- this will only fire if that layer is selectedIt may be worth updating the example (https://github.com/napari/napari/blob/main/examples/custom_key_bindings.py) as well.