When I bind keydown event for alt + 1 combination on the main component's element like so:
<div
@keydown.alt.49.prevent.exact="doSomething()"
>
It works, but when I try to bind it dynamically based on some logic in created (inspired by Programmatically bind custom events for dynamic components in VueJS):
created() {
this.$on('keydown.alt.49.prevent.exact', doSomething);
},
It does not work. What am I doing wrong?