mirror of
https://github.com/sigmasternchen/Wish
synced 2025-03-15 15:38:54 +00:00
20 lines
364 B
JavaScript
20 lines
364 B
JavaScript
var KeyCodes = function() {
|
|
}
|
|
KeyCodes.normalKey = function(code) {
|
|
return String.fromCharCode(code);
|
|
}
|
|
KeyCodes.isBackspace = function(code) {
|
|
if (code == 8)
|
|
return true;
|
|
return false;
|
|
}
|
|
KeyCodes.isDelete = function(code) {
|
|
if (code == 46)
|
|
return true;
|
|
return false;
|
|
}
|
|
KeyCodes.isEnter = function(code) {
|
|
if (code == 13)
|
|
return true;
|
|
return false;
|
|
}
|