Skip to content

A plugin to get the platform/browser keys required to activate the accessKeys

License

Notifications You must be signed in to change notification settings

gbosetti/browser-access-keys-activators

Repository files navigation

Browser's Access Key Activators detector (jQuery plugin)

Description

This jQuery plugin retrieves the keys that activate the access-key of the HTML elements which have it defined.

It currently supports Linux, Mac and Windows OS and Chrome, Firefox, Opera and IE. It uses some of the mapping info from https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/accesskey

Dependencies

Requires jQuery >=1.5 and https://github.com/bestiejs/platform.js/blob/master/platform.js

Usage

  1. Include jQuery & platform.js:

    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.min.js"></script>
    <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
  2. Include plugin's code:

    <script type="text/javascript" src="../Jquery.accessKeysActivators.js"></script>
  3. Call the plugin:

    $(function() {
    	var keys = $.getAccessKeyActivators();
    	console.log(keys);
    	$("div").html(keys.toString());
    });

Updating the plugin

Follow the instructions in https://github.com/jquery-boilerplate/jquery-boilerplate/wiki/How-to-publish-a-plugin-in-jQuery-Plugin-Registry

About

A plugin to get the platform/browser keys required to activate the accessKeys

Resources

License

Stars

Watchers

Forks

Packages

No packages published