mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fix(key) listener: handle of Numpad keys
This commit is contained in:
parent
79141e173c
commit
668561f006
1 changed files with 2 additions and 1 deletions
|
|
@ -109,6 +109,7 @@ var CloudCmd, Util, DOM;
|
|||
shift = event.shiftKey,
|
||||
meta = event.metaKey,
|
||||
isBetween = keyCode >= KEY.ZERO && keyCode <= KEY.Z,
|
||||
isNumpad = /Numpad/.test(event.code),
|
||||
isSymbol,
|
||||
char = '';
|
||||
|
||||
|
|
@ -133,7 +134,7 @@ var CloudCmd, Util, DOM;
|
|||
|
||||
/* in case buttons can be processed */
|
||||
if (Key.isBind())
|
||||
if (!alt && !ctrl && !meta && (isBetween || isSymbol))
|
||||
if (!isNumpad && !alt && !ctrl && !meta && (isBetween || isSymbol))
|
||||
setCurrentByChar(char);
|
||||
else {
|
||||
Chars = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue