(js) Improve hotkeys cheat sheet

Add mapping for '*' character code and remove hotkeys from cheat sheet
when no callback is registered.
pull/225/head
Francis Lachapelle 2016-10-17 15:38:13 -04:00
parent 9a050620f0
commit 1c0c7ab256
1 changed files with 3 additions and 0 deletions

View File

@ -71,6 +71,7 @@
};
// Char-code values for characters that require a key combinations
var CHAR_CODES = {
42: '*',
63: '?'
};
@ -272,6 +273,8 @@
ret = callbackArray.splice(i, 1);
}
}
if (callbackArray.length === 0)
delete this._hotkeys[hotkey.key];
}
return ret;
};