what is the node setup for a black luminance key
You can use the Distance Key compositor node (found under the Matte menu). This calculates a "distance" in color space from the specified color - which, in your case, you should set to pure black. You can set the Tolerance to a suitably small values eg, 0.001, and Falloff low for a sharp edge.



Using the Color output from the node will give you an image where the 'background' is converted to Alpha (which you should be able to simply 'Alpha Over' to overlay it over your original render) whereas the Matte output can be used as a Mix factor as you have used in your question.