vue.js – Key Modifiers

When listening for keyboard events, we often need to check for common key codes.
Remembering all the keyCodes is a hassle, so Vue provides aliases for the most commonly used keys:

  • .enter
  • .tab
  • .delete (captures both “Delete” and “Backspace” keys)
  • .esc
  • .space
  • .up
  • .down
  • .left
  • .right

For examples:

<input v-on:keyup.enter="submit">

if you want to reproduce, please indicate the source:
vue.js – Key Modifiers - CodeDay