Window.focusedLayer

Function/Meaning
Layer object that has focus
Type
Window class property (read/write)
Description
Represents the layer object that currently has focus. You can also set a value.
If null, no layer has focus. Setting a layer object will move the focus to that layer.