ctrlKey, altKey, shiftKey and keyCode do not function on dragover and other drag events. They always report false or 0.
This is still a problem in the latest version of Safari on macOS for drags initiated within the page. For drags initiated in external applications like Finder, the modifier key properties do update as expected. On iOS, this also works as expected. A related issue is https://bugs.webkit.org/show_bug.cgi?id=202418. The modifier key properties actually are set, but only if you hold the key down before dragging rather than pressing it while dragging. However, if you release the key while dragging, the property does not update in subsequent events.
<rdar://problem/99511310>