Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

VueJs System Modifier keys like exact ctrl alt shift meta

<!-- this will fire even if Alt or Shift is also pressed, it means if we click other key with ctrl then it will work -->
<button @click.ctrl="onClick">A</button>

<!-- this will only fire when Ctrl and no other keys are pressed, it means if we click other key with ctrl then it will not work -->
<button @click.ctrl.exact="onCtrlClick">A</button>

<!-- this will only fire when no system modifiers are pressed -->
<button @click.exact="onClick">A</button>
1
Source by v3.vuejs.org #
 
PREVIOUS NEXT
Tagged: #VueJs #System #Modifier #keys #exact #ctrl #alt #shift #meta
ADD COMMENT
Topic
Name
7+1 =