title: listening to browser events from the Vuex store
body: <p>I would like to provide Gamepad support for my Vue app. I would like to listen to the events from the <a href="https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API" rel="noreferrer">Gamepad API</a>.</p>
  
  <p>I don't want to attach those listeners to a component because I have to deal with them globally. So where should I attach those listeners? Should I add each event to the <em>App.vue</em> component, because it's the root of the app?</p>
  
  <p>I want to handle the gamepad inputs and states with Vuex. Is there a way I can listen directly to browser events via actions (/or mutations)? It would be awesome to setup my actions like...</p>
  
  <pre><code>export default {
    on_browser_gamepadconnected: ({ commit }, e) =&gt; {
      // do something
    },
  };
  </code></pre>