document.addEventListener('keydown', e => {
        if (keys.indexOf(e.key) !== -1) {
          this[direction] = true;
          $rootScope.$applyAsync();
        }