MCPcopy Create free account
hub / github.com/angular/components / _onKeydown

Function _onKeydown

src/material/datepicker/datepicker-input-base.ts:313–324  ·  view source on GitHub ↗
(event: KeyboardEvent)

Source from the content-addressed store, hash-verified

311 }
312
313 _onKeydown(event: KeyboardEvent) {
314 const ctrlShiftMetaModifiers: ModifierKey[] = ['ctrlKey', 'shiftKey', 'metaKey'];
315 const isAltDownArrow =
316 hasModifierKey(event, 'altKey') &&
317 event.keyCode === DOWN_ARROW &&
318 ctrlShiftMetaModifiers.every((modifier: ModifierKey) => !hasModifierKey(event, modifier));
319
320 if (isAltDownArrow && !this._elementRef.nativeElement.readOnly) {
321 this._openPopup();
322 event.preventDefault();
323 }
324 }
325
326 _onInput(event: Event) {
327 const value = (event.target as HTMLInputElement).value;

Callers

nothing calls this directly

Calls 2

hasModifierKeyFunction · 0.90
_openPopupMethod · 0.80

Tested by

no test coverage detected