Selectively disable keyboard shortcuts in custom interface?

Hi all,

I have a blocks interface that contains several elements which usually respond to hotkeys (e.g. a choice element plus a ner_manual element). I'd like to disable hotkeys for all but one of the elements (e.g. stop the choice element from responding, meaning the number hotkeys will be used to select ner_manual labels without triggering choice selections).

How would I best do that?

Thanks and all the best,
Andrea

Hi! That's a good question and it's definitely inconvenient if the choice shortcuts interfere with the label shortcuts, or vice versa.

One option would be to just re-map the choice keys to something else – you can do that by defining custom shortcuts for "1", "2" and so on, corresponding to the option index: https://prodi.gy/docs/api-web-app#actions-custom-labels So you could make the choice key 1 something like "shift+alt+1". Alternatively, you could also define custom shortcuts for the individual labels in ner_manual, like P for PERSON etc. This can be helful if you're mostly working with the same label set and there's an obvious mapping that's easy to learn for the annotator and maybe even more intuitive than the numbers :slightly_smiling_face:

Hi Ines! Thanks a lot for your super quick and helpful reply :heart_eyes_cat:

So I'll just give the keymap_by_label option to each of the different elements? That makes a lot of sense. Thanks a bunch!