import { globalObject } from '@skbkontur/global-object';
import { isKeyArrow, isKeyTab } from "../keyboard/identifiers";
var KeyListener = function KeyListener() {
  var _this = this;
  this.isTabPressed = false;
  this.isArrowPressed = false;
  globalObject.addEventListener == null || globalObject.addEventListener('keydown', function (e) {
    _this.isTabPressed = isKeyTab(e);
    _this.isArrowPressed = isKeyArrow(e);
  });
  globalObject.addEventListener == null || globalObject.addEventListener('mousedown', function () {
    _this.isTabPressed = false;
    _this.isArrowPressed = false;
  });
};
export var keyListener = new KeyListener();