Fix keyboard events when focused on inputs