* Adds a callback to be called when the key with the given keyCode is * pressed and the user is moused over the Component. * * @param {number} keyCode * @param {KeyCallback} callback * @returns {Interactions.Key} The calling Key Interaction.
(keyCode: number, callback: KeyCallback)
| 72 | * @returns {Interactions.Key} The calling Key Interaction. |
| 73 | */ |
| 74 | public onKeyPress(keyCode: number, callback: KeyCallback) { |
| 75 | if (!this._keyPressCallbacks[keyCode]) { |
| 76 | this._keyPressCallbacks[keyCode] = new Utils.CallbackSet<KeyCallback>(); |
| 77 | } |
| 78 | this._keyPressCallbacks[keyCode].add(callback); |
| 79 | return this; |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Removes a callback that would be called when the key with the given keyCode is |
no test coverage detected