Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

Special Keys


You can use this plugin to easily determine if a certain key is pressed at any time within you javascript timeframe be it an event or a function executed by a timer.

Just use:

if ($.specialKeys('ctrl')) {
    alert('Control Key is pressed');
}

at any point in your code and it will return true or false depending on if the key was pressed.

You can pass the following strings to check for special keys:

  • control, ctrl:
  • alt
  • shift
  • enter, return

Please let me know about any other keys you might want included.

you can also check for the key with the keyCode.
For example you can use 13 to check for Enter:

if ($.specialKeys(13)) {
    alert('Enter is pressed');
}

Downloads



0
Your rating: None