<template>
	<div style="display: none;">
	</div>
</template>

<script>
import { ref } from 'vue/dist/vue.esm-bundler';


export default {
	props: [
		"keyname",
		"target",
	],

	setup() {
		return {
		}
	},

	methods: {
		handler(e) {
			console.log(e.key);
			if (e.key == this.keyname) {
				document.location=this.target;
			}
		},
	},

	mounted() {
		window.addEventListener('keypress', this.handler);
	}
}
</script>
