Giter VIP home page Giter VIP logo

visualkeys's Introduction

visualKeys

VisualKeys is a jQuery plugin to configure shortcuts to users most used actions. It's best on web interfaces where users have to execute repetitive tasks giving them a faster way to do the job.

Menu

Install

Add dist/visualkeys-[version].min.js and dist/visualkeys-[version].min.css to your page

<link href="visualkeys-[version].min.css" rel="stylesheet"/>
<script src="jquery-[version].min.js"></script>
<script src="visualkeys-[version].min.js"></script>

Usage

$.visualkeys(options);

options is an object with the following properties:

{
  86 : { // key press to execute shortcut
    text : '<i>[key]</i><b>command</b> description', // text to show on menu
    exec : function(){/* will be executed when key is pressed */},
    hide : function(){/* will hide this menu item if this returns true */}
  }
}

The hide option can be used as a context. To show, for example, a shortcut that exists on one page but not on the other:

hide : function() { return ('page.selector').length > 0; }

Other options

  • change the appearence of the menu by editing visualkeys.css
  • bind esc to a exec:function(). It'll be executed right away, not showing the menu
  • open the menu and mouse click a shortcut. It'll be executed
  • F9 can be used as an alternative to ctrl+space to open the menu
  • unbind and remove visualkeys with $.visualkeys('remove')

Demo

There is a example at web/index.html

visualkeys's People

Contributors

fermads avatar

Watchers

Yashi Lanka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.