<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>
export default {
  data() {
    return {}
  },
  created() {
    addEventListener('keydown', (e) => {
      this.$store.dispatch('setKeyCode', e.key)
    })
    addEventListener('keyup', () => {
      this.$store.dispatch('setKeyCode', null)
    })
  },
}
</script>

<style lang="less">
* {
  margin: 0;
  padding: 0;
}

div {
  box-sizing: border-box;
}

body,
html {
  height: 100%;
  overflow: hidden;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
  overflow: hidden;
}
</style>
