Window.focusedLayer

Function/Meaning
[Windows +] Layer object with focus
Type
Window Class Properties
Explanation

Represents the layer object that currently has focus.
You can also set the value.
If null, no layer has focus.
Setting a layer object shifts focus to that layer.
Deprecated.
Cannot be used when drawing Canvas.