Pretty much full credit to Griffpatch for teaching me how to do this. Update 1.1 - Made arrow keys work.