Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Jun 16, 2012

  1. TJ Holowaychuk

    add component support

    authored June 15, 2012

Mar 21, 2012

  1. Thomas Fuchs

    one more doc fix

    authored March 21, 2012
  2. Thomas Fuchs

    update docs

    authored March 21, 2012
  3. Thomas Fuchs

    Merge pull request #33 from dominictarr/keymaster

    ---
    
    Ive moved the test for INPUT, SELECT and TEXTAREA into a property of `key`,
    `key.prekeydown`
    
    if the function assigned to `prekeydown` returns `false`, then keymaster ignores the key press.
    
    you can also change scope in this function, so you can have a scope the shortcuts that work inside an input.
    
    one quirk is that keys in the all scope still work when youve changed the scope.
    so, if you want shortcuts that do not apply inside an input, you need to assign them to a particular scope.
    
    Conflicts:
    	keymaster.min.js
    authored March 21, 2012
  4. Thomas Fuchs

    Merge pull request #31 from agnoster/keymaster

    ---
    
    Removes all handlers associated with a given scope, allowing throw-away and re-usable scopes. Includes test. Adds 1 function, 8 lines of functional code, and 117 bytes to the minified version.
    
    I took the liberty of adding a simple test for scope while I was at it.
    
    I love how keymaster is so simple and small, I hope this addition does not constitute undue bloat.
    
    If youre curious why I added this function: on a single-site app Im building we want to be able to be able to switch to different "apps" with their own shortcuts. However, when we navigate away from the app it is destroyed, and a new one is created when we navigate back. Allowing us to destroy the scope of all shortcuts the app registered means we dont need to worry about callbacks to a dead app being fired (and of course the app not getting garbage-collected because the closures hold references to it). Of course, if theres another, better way to do this, Id be happy to hear that too. Now, we can just do:
    
        // on app open
        key(n, this.appName, this.createNewItem);
        // ... and other shortcuts...
        key.setScope(this.appName);
    
        // on app close
        key.setScope(all);
        key.deleteScope(this.appName);
    
    Conflicts:
    	keymaster.js
    	keymaster.min.js
    authored March 21, 2012

Mar 05, 2012

  1. Dominic Tarr

    capital V

    authored March 05, 2012
  2. Dominic Tarr

    updated kemaster.min.js

    authored March 05, 2012
  3. Dominic Tarr

    processing keypresses is configurable via key.prekeydown

    authored March 05, 2012

Nov 11, 2011

  1. Thomas Fuchs

    update minified version

    authored November 11, 2011
  2. Thomas Fuchs

    Merge pull request #19 from micsco/patch-1

    Added a getScope method.
    authored November 11, 2011
  3. Thomas Fuchs

    also reset key.shift etc. clean up.

    authored November 11, 2011
  4. Thomas Fuchs

    Merge pull request #32 from lowe/alttab

    reset modifiers to false on window focus. fixes alt+tab, tab switching, and related issues
    authored November 11, 2011

Nov 06, 2011

  1. Dan Wheeler

    reset modifiers to false on window focus. fixes issues with alt+tab, …

    …switching browser tabs with the keyboard, etc
    authored November 06, 2011

Nov 03, 2011

  1. Isaac Wolkerstorfer

    Add key.deleteScope(scope) to remove all handlers

    Removes all handlers associated with a given scope, allowing throw-away and re-usable scopes. Includes test. Adds 1 function, 8 lines of functional code, and 117 bytes to the minified version.
    authored November 03, 2011
  2. Isaac Wolkerstorfer

    Add test for scoping

    authored November 03, 2011

Sep 13, 2011

  1. Thomas Fuchs

    Merge pull request #26 from ded/master

    makin stuff clean
    authored September 13, 2011
  2. Dustin Diaz

    - bump version with latest updates

    authored September 12, 2011

Sep 10, 2011

  1. Mike Scott

    Fixed the getScope method to use _scope instead of undefined scope va…

    …riable.
    authored September 11, 2011

Sep 08, 2011

  1. Thomas Fuchs

    Merge pull request #20 from TrevorBurnham/master

    Unicode for ctrl key
    authored September 07, 2011

Sep 05, 2011

  1. Trevor Burnham

    Making KEYS object consistent with _MODIFIERS

    authored September 05, 2011
  2. Trevor Burnham

    Adding modifier key test for fancy ctrl (⌃)

    authored September 05, 2011
  3. Trevor Burnham

    More consistent modifier key ordering

    authored September 05, 2011
  4. Trevor Burnham

    Adding unicode ctrl key character (⌃)

    authored September 05, 2011

Sep 04, 2011

  1. Thomas Fuchs

    add usage section

    authored September 04, 2011
  2. Thomas Fuchs

    typos in readme

    authored September 04, 2011
  3. Thomas Fuchs

    structure README

    authored September 04, 2011
  4. Thomas Fuchs

    Merge pull request #18 from qurve/master

    Typo fix.
    authored September 04, 2011
  5. Mike Scott

    Added a getScope method.

    authored September 05, 2011
  6. Daniel Pehrson

    Fix typo in README.

    authored September 04, 2011
  7. Thomas Fuchs

    fix that shortcuts with , are possible; add alphanumeric keys test

    authored September 04, 2011
  8. Thomas Fuchs

    add fancy modifier test; add stubs for remaining tests

    authored September 04, 2011
  9. Thomas Fuchs

    start test suite

    authored September 04, 2011
  10. Thomas Fuchs

    add simple makefile to create minified keymaster

    authored September 04, 2011

Sep 03, 2011

  1. Thomas Fuchs

    handle common punctuation keys correctly. fixes #15

    authored September 03, 2011
  2. Thomas Fuchs

    handle common punctuation keys correctly. fixes #15

    authored September 03, 2011
Something went wrong with that request. Please try again.