mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
add keyCode api to EventCustom
This commit is contained in:
@@ -326,6 +326,21 @@ EventCustom.prototype.getUserData = function () {
|
||||
EventCustom.prototype.getEventName = cc.Event.prototype.getType;
|
||||
|
||||
|
||||
/**
|
||||
* !#en
|
||||
* The keyCode read-only property represents a system and implementation dependent numerical code identifying the unmodified value of the pressed key. </br>
|
||||
* This is usually the decimal ASCII (RFC 20) or Windows 1252 code corresponding to the key.</br>
|
||||
* If the key can't be identified, this value is 0.</br>
|
||||
*
|
||||
* !#zh
|
||||
* keyCode 是只读属性它表示一个系统和依赖于实现的数字代码,可以识别按键的未修改值。</br>
|
||||
* 这通常是十进制 ASCII (RFC20) 或者 Windows 1252 代码,所对应的密钥。</br>
|
||||
* 如果无法识别该键,则该值为 0。
|
||||
*
|
||||
* @property keyCode
|
||||
* @type {Number}
|
||||
*/
|
||||
|
||||
var MAX_POOL_SIZE = 10;
|
||||
var _eventPool = new JS.Pool(MAX_POOL_SIZE);
|
||||
EventCustom.put = function (event) {
|
||||
|
||||
Reference in New Issue
Block a user