Detect if SpaceView3D is in camera view

Pressing Numpad 0 enters camera view. How can I detect from context whether this mode is active? It looks like it should be a property of SpaceView3D, but nothing seems to be it.

I need this to make my custom camera controls addon able to behave sensibly if used while the user is in this mode.

RegionView3D.view_perspective will return a string, depending on the type of view it is, either orthographic, perspective, or camera.

for a in bpy.context.screen.areas:
    if a.type == 'VIEW_3D':

If you are asking how to tell if the camera is active


If there is a way to tell whether it is looking through camera view, that I do not know


use bpy.context.screen.areas, that was off the top of my head untested code. old habits die hard.