UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 287 B
import{InputHandler as t}from"../../../input/InputHandler.js";class e extends t{constructor(t,e){super(!0),this.key=t,this.registerIncoming("key-down",e,(t=>this._handleKeyDown(t)))}_handleKeyDown(t){t.data.key===this.key&&(this.activate(),t.stopPropagation())}}export{e as SingleKey};