Skip to content

Commit

Permalink
Added ctrl key forcing default behaviour
Browse files Browse the repository at this point in the history
Allows copying/pasting to textarea, closes #1
  • Loading branch information
kittsville committed Jul 20, 2015
1 parent 9f40699 commit a132eb6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions assets/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ var Chomskey = {
},

typeKey: function(event) {
if (event.ctrlKey) {
return;
}

var keyCharacter, keyCode = event.which;

if (Chomskey.s.shift) {
Expand All @@ -105,8 +109,6 @@ var Chomskey = {
event.preventDefault();

this.s.typingArea.val(this.s.typingArea.val() + keyCharacter);
} else {
return;
}
},

Expand Down

0 comments on commit a132eb6

Please sign in to comment.