Skip to content

sshaw/command-or-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Command or Control

Determine if the browser uses the command or control key as a shortcut modifier

Usage

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

CommonJS

const { key } = require('command-or-control');
key()

UMD

<script src="dist/command-or-control.umd.js"></script>
<script>
  commandOrControl.key()
</script>

Author

Skye Shaw (skye.shaw -AT- gmail)

License

Released under the MIT License: http://www.opensource.org/licenses/MIT

About

Determine if the browser uses the command or control key as a shortcut modifier

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published