Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added a getScope method. #19

Merged
merged 2 commits into from

2 participants

@micsco

To allow plugins to react to the current scope (such as the key sequence plugin) access to the state of the internal scope variable is needed.

This path adds that access with a simple get method.

@micsco

That'll teach me, I forked using github web editor and had a different version I was using locally to test. Fixed now.

@madrobby madrobby merged commit 6b06955 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 4, 2011
  1. @micsco

    Added a getScope method.

    micsco authored
Commits on Sep 10, 2011
  1. @micsco
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  keymaster.js
View
2  keymaster.js
@@ -131,6 +131,7 @@
// set current scope (default 'all')
function setScope(scope){ _scope = scope || 'all' };
+ function getScope(){ return _scope || 'all' };
// cross-browser events
function addEvent(object, event, method) {
@@ -147,6 +148,7 @@
// set window.key and window.key.setScope
global.key = assignKey;
global.key.setScope = setScope;
+ global.key.getScope = getScope;
if(typeof module !== 'undefined') module.exports = key;
Something went wrong with that request. Please try again.