MCPcopy Index your code
hub / github.com/UI5/webcomponents / _onKeyDown

Method _onKeyDown

packages/main/src/SplitButton.ts:290–312  ·  view source on GitHub ↗
(e: KeyboardEvent)

Source from the content-addressed store, hash-verified

288 }
289
290 _onKeyDown(e: KeyboardEvent) {
291 if (this._isArrowKeyAction(e)) {
292 this._handleArrowButtonAction(e);
293 this._activeArrowButton = true;
294 return;
295 }
296
297 if (this._isDefaultAction(e)) {
298 this._handleDefaultAction(e);
299 return;
300 }
301
302 if ((isShift(e) || isEscape(e)) && this._textButtonActive) {
303 e.preventDefault();
304 this._shiftOrEscapePressedDuringSpace = true;
305 }
306
307 if (isEscape(e) && !this._textButtonActive) {
308 this._resetActionButtonStates();
309 }
310
311 this._tabIndex = -1;
312 }
313
314 _onKeyUp(e: KeyboardEvent) {
315 const target = e.target as Button;

Callers 1

_onkeydownMethod · 0.45

Calls 7

_isArrowKeyActionMethod · 0.95
_isDefaultActionMethod · 0.95
_handleDefaultActionMethod · 0.95
isShiftFunction · 0.85
isEscapeFunction · 0.85

Tested by

no test coverage detected