event metaKey in jQuery

event.metaKey is true if we have pressed the Windows key in Windows and the command key in Mac.

In the following example there is an 'input type="text"' where we can write anything, if we press the Windows or Command (Mac) key we will obtain true as a result.

We will use the following methods:

  • metaKey.
  • keydown(). Event that is fired when I press a key while inside an element. It includes "special keys" and is Case Insensitive.

 

 

Comments

PHP Captcha


Interesting Articles