Last active
August 29, 2015 13:56
-
-
Save nmussy/9058800 to your computer and use it in GitHub Desktop.
Just a quick set of keyboard shortcuts used for http://www.twitch.tv/twitchplayspokemon
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
var a = { | |
"37": "left", | |
"38": "up", | |
"39": "right", | |
"40": "down", | |
"65": "a", | |
"66": "b" | |
}; | |
$(document).on('keypress', function(e) { | |
if(a[e.which]) | |
$('#chat_text_input').val(a[e.which]); | |
$('#chat_speak').click(); | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment