make hash_handler parseKeys accessible from outside

This commit is contained in:
nightwing 2012-04-25 21:19:11 +04:00
commit 6799599306

View file

@ -84,10 +84,10 @@ function HashHandler(config, platform) {
var ckb = this.commmandKeyBinding;
key.split("|").forEach(function(keyPart) {
var binding = parseKeys(keyPart, command);
var binding = this.parseKeys(keyPart, command);
var hashId = binding.hashId;
(ckb[hashId] || (ckb[hashId] = {}))[binding.key] = command;
});
}, this);
};
this.addCommands = function(commands) {
@ -127,7 +127,7 @@ function HashHandler(config, platform) {
this.bindKey(key, command);
};
function parseKeys(keys, val) {
this.parseKeys = function(keys, val) {
var key;
var hashId = 0;
var parts = keys.toLowerCase().trim().split(/\s*\-\s*/);