Properly handle nil values the first time a modifier key is pressed