Fix assignment in dupe keypress function