Skip to content
Trigger Vue methods by pressing cmd+enter, windows+enter or ctrl+enter
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Trigger Vue methods by pressing cmd+enter, ctrl+enter or windows key+enter

npm version npm downloads npm license


npm install meta-ctrl-enter --save


Why not use @keydown.meta.enter="myMethod"?

Tl;dr: On Windows keyboards, meta is the windows key (⊞), and this is not a "natural" modifier key. By using v-meta-ctrl-enter you'll be able to use ctrl+enter which is a widley used modifier key.

From Vue.js documentation:

On Macintosh keyboards, meta is the command key (⌘). On Windows keyboards, meta is the windows key (⊞). On Sun Microsystems keyboards, meta is marked as a solid diamond (◆). On certain keyboards, specifically MIT and Lisp machine keyboards and successors, such as the Knight keyboard, space-cadet keyboard, meta is labeled “META”. On Symbolics keyboards, meta is labeled “META” or “Meta”.


// Load using CommonJS syntax
const Vue = require('vue');
const MetaCtrlEnter = require('meta-ctrl-enter');

// Load using ES6 syntax
import Vue from 'vue';
import MetaCtrlEnter from 'meta-ctrl-enter';
    <input type="text" v-meta-ctrl-enter="submit">

    export default {
      methods: {
        submit(event) {
          // This will be triggered when pressing;
          // cmd + enter
          // windows key + enter
          // ctrl + enter
          console.log('triggered ...', event);


MIT © Daniel Eckermann

You can’t perform that action at this time.