Determine if the browser uses the command or control key as a shortcut modifier
import { key } from 'command-or-control';
key() // 'Ctrl' or 'Cmd'
key({display: 'symbol'}) // '^' or '⌘'
key({display: 'long'}) // 'Control' or 'Command'
key({localize: true}) // 'Ctrl' or 'Cmd' or 'Strg' if in a German locale
const { key } = require('command-or-control');
key()
<script src="dist/command-or-control.umd.js"></script>
<script>
commandOrControl.key()
</script>
Skye Shaw (skye.shaw -AT- gmail)
Released under the MIT License: http://www.opensource.org/licenses/MIT