onKeyUp method

  1. @HostListener('keyup')
void onKeyUp (
  1. KeyboardEvent event
)
@HostListener('keyup')

Implementation

@HostListener('keyup')
void onKeyUp(KeyboardEvent event) {
  if (event.keyCode == KeyCode.ENTER && event.shiftKey) {
    _valChanged.add(_host.value);
  } else if (event.keyCode == KeyCode.ESC) {
    _host.value = _oldValue;
  }
}