handleKeyPress method

  1. @HostListener('keypress')
  2. @visibleForTemplate
void handleKeyPress(
  1. KeyboardEvent event
)

Implementation

@HostListener('keypress')
@visibleForTemplate
void handleKeyPress(KeyboardEvent event) {
  if (event.target != _root || !isSpaceKey(event)) return;
  // Required to prevent window from scrolling.
  event.preventDefault();
  _isKeyboardEvent = true;
  select();
}