Categories

Oct 21, 2019 in Vue.JS

Q:

What are key modifiers?

1 Answer

Oct 21, 2019

Vue supports key modifiers on v-on for handling keyboard events. Let's take an example of keyup event with enter keycode.

<!-- only call `vm.show()` when the `keyCode` is 13 -->
<input v-on:keyup.13="show">

Remembering all the key codes is really difficult. It supports the full list of key codes aliases

  1. .enter
  2. .tab
  3. .delete (captures both “Delete” and “Backspace” keys)
  4. .esc
  5. .space
  6. .up
  7. .down
  8. .left
  9. .right
Click here to read more about Vue JS
Click here to read more about Insurance

Related questions

Madanswer
Oct 21, 2019 in Vue.JS
Oct 21, 2019 in Vue.JS
Oct 21, 2019 in Vue.JS
...