mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 08:54:10 +00:00
refactor(key) setCurrentByLetter -> setCurrentByChar
This commit is contained in:
parent
86e169a18e
commit
ae8e5379e6
1 changed files with 3 additions and 3 deletions
|
|
@ -109,12 +109,12 @@ var CloudCmd, Util, DOM;
|
|||
else
|
||||
char = event.key;
|
||||
|
||||
isSymbol = char === '_' || char === '.';
|
||||
isSymbol = ~['.', '_'].indexOf(char);
|
||||
|
||||
/* если клавиши можно обрабатывать*/
|
||||
if (Key.isBind())
|
||||
if (!alt && !ctrl && !meta && (isBetween || isSymbol))
|
||||
setCurrentByLetter(char);
|
||||
setCurrentByChar(char);
|
||||
else {
|
||||
Chars = [];
|
||||
switchKey(event);
|
||||
|
|
@ -129,7 +129,7 @@ var CloudCmd, Util, DOM;
|
|||
return char;
|
||||
}
|
||||
|
||||
function setCurrentByLetter(char) {
|
||||
function setCurrentByChar(char) {
|
||||
var i, n, name, isMatch, byName, firstByName,
|
||||
skipCount = 0,
|
||||
skipN = 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue