fixed bug: press arrow keys will output 'ABCD'