keystroke fix and better event handling in IR