Question about the Layer property

I have a Layer that I want active sometimes but not others. I see how I can achieve this by using the “Levels follow expression value” option; but I would like to have the user set the levels direction with keystrokes or the right-click menu, and also be able to turn the layer on or off (without having to go through setting one layer to a “blank” image and cycling through that layer with keystrokes). I’m sure there must be a way to do this, but so far it eludes me; all suggestions appreciated. Thanks!
–Dave

Dynamic Property is the ideal trait to pair with the Layer setting you’re looking to employ.

Thanks, Joel; I had been going down that road, but trying to use a Dynamic Property to somehow turn the whole layer on or off. Reading your post made me realize that I should probably just use the DP to set the layer value directly, including to “blank” layer to turn the layer “off”. Much appreciated.
–Dave