kai-jacobsen/kontentblocks

View on GitHub
js/src/common/Window.js

Summary

Maintainability
A
0 mins
Test Coverage
module.exports =  {

  cntrlIsPressed: false,
  init: function(){
    var that = this;
    jQuery(document).keydown(function (event) {
      if (event.which == "17"){
        that.cntrlIsPressed = true;
      }
    });

    jQuery(document).keyup(function () {
      that.cntrlIsPressed = false;
    });
  },
  ctrlPressed: function(){
    return this.cntrlIsPressed;
  }

};