MCPcopy Create free account
hub / github.com/UI5/webcomponents / _keydown

Method _keydown

packages/main/src/Token.ts:189–207  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

187 }
188
189 _keydown(e: KeyboardEvent) {
190 const isBackSpacePressed = isBackSpace(e);
191 const isDeletePressed = isDelete(e);
192
193 if (!this.readonly && (isBackSpacePressed || isDeletePressed)) {
194 e.preventDefault();
195
196 this.fireDecoratorEvent("delete", {
197 backSpace: isBackSpacePressed,
198 "delete": isDeletePressed,
199 });
200 }
201
202 if (isSpace(e) || isSpaceCtrl(e)) {
203 e.preventDefault();
204
205 this._handleSelect();
206 }
207 }
208
209 get tokenDeletableText() {
210 return Token.i18nBundle.getText(TOKEN_ARIA_DELETE);

Callers

nothing calls this directly

Calls 5

_handleSelectMethod · 0.95
isBackSpaceFunction · 0.85
isDeleteFunction · 0.85
isSpaceFunction · 0.85
isSpaceCtrlFunction · 0.85

Tested by

no test coverage detected