Application Shortcuts with a Renderless Event Component
summary
Builds a tiny renderless event component that registers global window events via a render function, mounts an event listener in mounted and removes it in destroyed, and then refactors to read handlers from $listeners so Vue v-on syntax (eg key.down.space) works. Demos include scroll-driven background color, offline warning, space toggling video, and a meta+F search overlay; companion repo and package vue-global-events cover edge cases and composition API examples.
AI-written summary · about








