Skip to content

Commit

Permalink
issue#57 solved
Browse files Browse the repository at this point in the history
  • Loading branch information
tzury committed Jul 8, 2009
1 parent 8e27c34 commit 4431c3a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 180 deletions.
174 changes: 0 additions & 174 deletions jquery.hotkeys-0.0.6.js

This file was deleted.

26 changes: 20 additions & 6 deletions jquery.hotkeys.js
Expand Up @@ -27,12 +27,19 @@ Note:

(function (jQuery){
// keep reference to the original $.fn.bind, $.fn.unbind and $.fn.find
jQuery.fn.__bind__ = jQuery.fn.bind;
jQuery.fn.__unbind__ = jQuery.fn.unbind;
jQuery.fn.__find__ = jQuery.fn.find;
// check if not defined first solving issue#57 (http://code.google.com/p/js-hotkeys/issues/detail?id=57)
if (!jQuery.fn.__bind__){
jQuery.fn.__bind__ = jQuery.fn.bind;
}
if (!jQuery.fn.__unbind__){
jQuery.fn.__unbind__ = jQuery.fn.unbind;
}
if (!jQuery.fn.__find__){
jQuery.fn.__find__ = jQuery.fn.find;
}

var hotkeys = {
version: '0.7.9',
version: '0.8.0',
override: /keypress|keydown|keyup/g,
triggersMap: {},

Expand All @@ -51,7 +58,7 @@ Note:
// i.e. {'keyup': {'ctrl': {cb: callback, disableInInput: false}}}
var result = {};
result[type] = {};
result[type][combi] = {cb: callback, disableInInput: false};
result[type][combi] = {cb: callback, disableInInput: false, shortcut: combi};
return result;
}
};
Expand Down Expand Up @@ -229,7 +236,14 @@ Note:
|| elem.is("input") || elem.is("textarea") || elem.is("select")) {
return true;
}
}
}
/***********
fix the data issue -- see: combi.html
************/

console.log(event.data);
console.log(trigger);

// call the registered callback function
result = result || trigger[x].cb.apply(this, [event]);
}
Expand Down

0 comments on commit 4431c3a

Please sign in to comment.