title: Change function keyEvent to swipeEvent in Typescript
body: <p>I wanted to change the KeyEvents() function for another that manages the movement of the swipe, that is, if I move down to do one thing and if I move upwards I do another. It would be changing the movement of keys by the swipe. </p>
  
  <p>I hope someone can give me an example or something. 
  I leave the function I want to change here below. Thank you very much</p>
  
  <pre><code>KeyEvents() {
  
      if (this.subskey != undefined)
        this.subskey.unsubscribe();
  
      this.subskey = this.APPService.keyEvent$.subscribe((event) =&gt; {
  
        switch (event.keyCode) {
  
          case this.keyCodes.KEY_UP:
            this.isText('UP');
            break;
          case this.keyCodes.KEY_DOWN:
            this.isText('DOWN');
            break;
        }
      });
    }
  </code></pre>