Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Commits on Jun 16, 2012
  1. add component support

    authored
Commits on Mar 21, 2012
  1. @madrobby

    one more doc fix

    madrobby authored
  2. @madrobby

    update docs

    madrobby authored
  3. @madrobby

    Merge pull request #33 from dominictarr/keymaster

    madrobby authored
    ---
    
    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
  4. @madrobby

    Merge pull request #31 from agnoster/keymaster

    madrobby authored
    ---
    
    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
Commits on Mar 5, 2012
  1. @dominictarr

    capital V

    dominictarr authored
  2. @dominictarr

    updated kemaster.min.js

    dominictarr authored
  3. @dominictarr
Commits on Nov 11, 2011
  1. @madrobby

    update minified version

    madrobby authored
  2. @madrobby

    Merge pull request #19 from micsco/patch-1

    madrobby authored
    Added a getScope method.
  3. @madrobby
  4. @madrobby

    Merge pull request #32 from lowe/alttab

    madrobby authored
    reset modifiers to false on window focus. fixes alt+tab, tab switching, and related issues
Commits on Nov 6, 2011
  1. @lowe

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

    lowe authored
    …switching browser tabs with the keyboard, etc
Commits on Nov 3, 2011
  1. @agnoster

    Add key.deleteScope(scope) to remove all handlers

    agnoster authored
    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.
  2. @agnoster

    Add test for scoping

    agnoster authored
Commits on Sep 13, 2011
  1. @madrobby

    Merge pull request #26 from ded/master

    madrobby authored
    makin stuff clean
  2. @ded

    - bump version with latest updates

    ded authored
Commits on Sep 10, 2011
  1. @micsco
Commits on Sep 8, 2011
  1. @madrobby

    Merge pull request #20 from TrevorBurnham/master

    madrobby authored
    Unicode for ctrl key
Commits on Sep 5, 2011
  1. @TrevorBurnham
  2. @TrevorBurnham
  3. @TrevorBurnham
  4. @TrevorBurnham
Commits on Sep 4, 2011
  1. @madrobby

    add usage section

    madrobby authored
  2. @madrobby

    typos in readme

    madrobby authored
  3. @madrobby

    structure README

    madrobby authored
  4. @madrobby

    Merge pull request #18 from qurve/master

    madrobby authored
    Typo fix.
  5. @micsco

    Added a getScope method.

    micsco authored
  6. @dpehrson

    Fix typo in README.

    dpehrson authored
  7. @madrobby
  8. @madrobby
  9. @madrobby

    start test suite

    madrobby authored
  10. @madrobby
Commits on Sep 3, 2011
  1. @madrobby
  2. @madrobby
Something went wrong with that request. Please try again.