vue-shortkey
vue-shortkey copied to clipboard
Shortkeys are not working when language is changed
I have key combinations involving Alt and Shift. On Windows, those two keys are used to switch the input language. If I have a shortkey for Alt+A, it works perfectly if I'm writing in English. However, if I accidentally switch to my other language (Bulgarian), the shortkey no longer works. I guess it's because the a key is now ь, and I have no combination set for Alt+ь.
However, I noticed that when I press the a, it has the same keycode (65) no matter what language I'm writing in. Perhaps an option can be implemented that allows you to use keycodes to monitor the keys?
I am facing the same issue. In my case, I need the key combinations to work in English, Russian and Ukrainian. As a temporary workaround, I'm using this setup with "multi keys":
<div
v-shortkey.once="{en: ['shift', 's'], ru: ['shift', 'ы'], ua: ['shift', 'і']}"
@shortkey="() => onShiftS()"
>
I just switched to hotkeys. It doesn't have that problem and did the job for me. Depends on how important reactivity is for you.