Skip to content

A small jquery script that allows you to set arbitrary hotkeys for your start page.

License

Notifications You must be signed in to change notification settings

deadlocking/arbitrary-hotkeys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Arbitrary Hotkeys

GitHub license GitHub release

jQuery plugin that allows you to set arbitrary hotkeys for hyperlinks in your HTML page.

demonstration_arbitrary-hotkeys

Usage

  • Download the script or get the link to the script with CDN here
  • Import both jQuery and arbitrary-hotkeys.js in your HTML head, example:
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="js/arbitrary-hotkeys.js"></script>
  • Create a HTML tag inside head named "hotkey" and list the hotkeys you want in this form:
    <hotkey key="your_hotkey" targetId="id_of_your_html_hyperlink"></hotkey> (a HTML tag)
    Example:
    <hotkey key="git" targetId="github"></hotkey>
    <hotkey key="goo" targetId="google"></hotkey>

For this example of hiperlink in HTML body:

<a id="google" href="https://plus.google.com">Google+</a>
<a id="github" href="https://github.com">GitHub</a>
  • Enjoy!

An example of HTML document using arbitrary-hotkeys.js: Example

Troubleshooting

Arbitrary Hotkeys doesn't work with Ctrl, Alt and Shift buttons!

  • Arbitrary Hotkeys was made for setting up keystrokes in web pages from strings, like "f", "ja", "trello" with usage inside user's HTML (not in a script), and it doesn't support modifiers.

License

Arbitrary Hotkeys is distributed under the terms of the MIT License. See the LICENSE file for details.

Bug tracker

Found a bug? Want to suggest a new feature or improvement? Let us know here on GitHub!

Authors

Arbitrary Hotkeys is reusing code by Christian Brassat and Jukka Svahn: https://github.com/crshd/startpage.rwrt/blob/master/js/script.js

Pull Request

Contributors are welcome! Issues - arbitrary-hotkeys

About

A small jquery script that allows you to set arbitrary hotkeys for your start page.

Resources

License

Stars

Watchers

Forks

Packages

No packages published