Entrez Key Vue
<!-- only call `vm.submit()` when the `key` is `Enter` -->
<input v-on:keyup.enter="submit()">
<input @keyup.enter="submit()">
vue
MM.Mirzaei.Dev
<!-- only call `vm.submit()` when the `key` is `Enter` -->
<input v-on:keyup.enter="submit()">
<input @keyup.enter="submit()">
vue
<input type="text" v-on:keyup.enter="submit" />
<p> {{ outputValueOnEnter }} </p>
//In data() :
outputValueOnEnter = ''
// In methods:
submit(e) {
this.outputValueOnEnter = e.target.value
e.target.value = ''
}
<!-- Alt + C -->
<input v-on:keyup.alt.67="clear">
<!-- Ctrl + Click -->
<div v-on:click.ctrl="doSomething">Do something</div>