You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can second this issue, I had a hard time figuring out how to handle the "." character (the period, as OP mentioned).
Here is how I ended up with, in the template:
<GlobalEvents
@keyup.prevent="handleKeyUp"
/>
and in the code (TypeScript):
methods: {
//....
/** Generally handle all keyUp events, by checking for recognisable events
*/
handleKeyUp(event: KeyboardEvent) {
//Is the dot?
if (event.code === 'NumpadDecimal' || event.code === 'Period') {
//.... do my stuff
}
},
I suggest adding this to the docs. @shentao Would you do that, or should I submit a pull request?
I'm happy to write these docs but right now it isn't super clear how to set keylisteners for stuff like "period".
Ideally there would be exhaustive docs for every key code.
This module is great! Thank you!!!
The text was updated successfully, but these errors were encountered: