Created
February 20, 2015 22:54
-
-
Save CarlColglazier/e6386905661054190681 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
document.addEventListener('keydown', function (event) { | |
if (document.getElementById('chat').style.display.indexOf('block') >= 0) { | |
tagpro.disableControls = false; | |
} | |
}); | |
document.getElementById('chat').addEventListener('keydown', function (event) { | |
// if (event.keyCode === 65 || event.keyCode === 68 || event.keyCode === 83 || event.keyCode === 87) // pressed A, D, S, W. | |
if (event.keyCode !== 13 && (event.keyCode < 37 || event.which > 40)) { | |
event.stopPropagation(); | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment