fgr-araujo / vue-shortkey

Vue-ShortKey - The ultimate shortcut plugin to improve the UX
MIT License
889 stars 101 forks source link

Once and multiple keys not firing event #126

Open hackerESQ opened 3 years ago

hackerESQ commented 3 years ago

Hello @iFgR, this is a fantastic library! Great work!

I am making a cross-platform web app and your suggestion in #103 helps a lot. But it seems that is incompatible with the .once modifier?

For example, this triggers the event:

   <v-btn
        @click="saveEvent"
        @shortkey="saveEvent"
        v-shortkey="{windows: ['ctrl', 's'], mac: ['meta', 's']}"
    >
        Save Event
    </v-btn>

But this does not:

    <v-btn
        @click="saveEvent"
        @shortkey="saveEvent"
        v-shortkey.once="{windows: ['ctrl', 's'], mac: ['meta', 's']}"
    >
        Save Event
    </v-btn>

I tried looking at the source, but I'm not seeing any obvious issues. Any suggestions?

fgr-araujo commented 3 years ago

Hi @hackerESQ, I'll reproduce and check this out.