-
Notifications
You must be signed in to change notification settings - Fork 94
Description
Currently, we have two visualization tools that link keys to layers that they activate:
heldkey type, which indicates a held-down key while a layer is active- the hyperlink to the layer header on the activator field in a key, added by
draw_config.style_layer_activators
The first one is determined by keymap parse (when it can, it fails for custom behaviors and customizations using raw_binding_map, see #113 and #157) and is reflected in the keymap YAML with the type: held field.
The second one on the other hand, is determined by keymap draw through a simple string match: it only checks if the legend field is exactly equal to one of the layer names. This cannot be specified in any way in keymap YAML or customized with draw_config. For instance, the detection doesn't work when you use parse_config.layer_legend_map to customize layer legends (#148).
I think it is inelegant and not good design to have this incongruency, where at the end of the day, both features are tying layers to the keys they activate from. Both 1. and 2. should be able to be configured in keymap YAML or draw_config.
Implementation alternatives: TBD