In the javascript Event object, there are some boolean values to check if modifier keys are pressed:
Event
ctrlKey
Worth mentioning is that it is possible to detect this in modern browser by checking the location of the alt key event.
See: Is there a way to detect which side the Alt key was pressed on (right or left)?