Q-Select Home/End key support
-
Hi.
I’m trying to bound the Home/End and PgDown/PgUp keys to do “big jumps” while navigating the qselect options.
The goal is to:
- Home => Go to first option
- End => Go to last option
- Page Up => Scroll up one page of options
- Page Down => Scroll down one page of options
Looks like I’m out of luck, for no keyboard event seems to be firing as I navigate the option popup.
Am I missing something? There is a way to catch events there?
Another thing, I need to disable the “wrapping” behaviour of when you’re at the last option the next arrow down stroke puts you back at the first option. I need the navigation to stop at both ends. Any hints on that?
Thank you very much.
-
Here’s a Quasar demo with keybinding:
https://quasar.dev/vue-components/table#Keyboard-navigation
I googled some more and found this:
https://vuejsfeed.com/blog/binding-hotkeys-to-components-with-a-custom-vue-js-directive
https://github.com/Dafrok/v-hotkey
without plugins:
-
Hi. Thank you!
I’ll read your suggestions.
Thanks!