lazy-widgets
Version:
Typescript retained mode GUI for the HTML canvas API
17 lines • 565 B
JavaScript
import { KeyEvent } from './KeyEvent.js';
/**
* A key press {@link KeyEvent} (key down). Also dispatched on key repeats.
*
* @category Event
*/
export class KeyPressEvent extends KeyEvent {
constructor(key, shift, ctrl, alt, virtual, target) {
super(key, shift, ctrl, alt, virtual, target);
this.type = KeyPressEvent.type;
}
cloneWithTarget(target) {
return new KeyPressEvent(this.key, this.shift, this.ctrl, this.alt, this.virtual, target);
}
}
KeyPressEvent.type = 'key-press';
//# sourceMappingURL=KeyPressEvent.js.map