Maps.cb.keypress.attachο
- class eomaps.eomaps.Maps.cb.keypress.attach(parent)ο
Attach custom or pre-defined callbacks on keypress events.
Each callback takes 1 additional keyword-arguments:
- keystr or None
The key to use.
Modifiers are attached with a β+β, e.g. βalt+dβ
If None, the callback will be fired on any key!
For additional keyword-arguments check the doc of the callback-functions!
Examples
Attach a pre-defined callback:
>>> m.cb.keypress.attach.switch_layer(layer=1, key="1")
Attach a custom callback:
>>> def cb(**kwargs): >>> ... do something ... >>> >>> m.cb.keypress.attach(cb, key="3")
Members
Fetch (and cache) layers of a map. |
|
Toggle displaying a layer on top of the currently visible layers. |
|
Set the currently visible layer of the map. |