import { Event } from "../Event" ; export abstract class KeyEvent extends Event { key : string ; constructor ( name , source , key ) { super ( name , source ) ; this . key = key ; } } export class KeyDownEvent extends KeyEvent { static NAME = "key-down" ; constructor ( source , key ) { super ( KeyDownEvent . NAME , source , key ) ; } } export class KeyUpEvent extends KeyEvent { static NAME = "key-up" ; constructor ( source , key ) { super ( KeyUpEvent . NAME , source , key ) ; } }