Fixed duplicate keydown event bug