An electromechanical locking system includes a locking mechanism that is
switchable between a locked position and an unlocked position, a keyway
for receiving a rotatable key, a latch, and an angle detector for
detecting an angular orientation of the key while the key is in the
keyway. After detecting a sequence of angular orientations of a key, the
angle detector may issue a corresponding angle sequence data. A lock
controller controls the latch in accordance with an authentication data
that has been received from the key and the issued angle sequence data
that reflects a combination code. If the authentication data and the
angle sequence data are both valid, the lock controller enable operation
of the latch, whether automatically or manually. The key includes a light
source that projects a light beam at an acute angle in order to provide a
visual indication of a current angular orientation of the key.