Added input event filtering for keyboard key presses