Change the name of "theLayer" to your adjustment layer name (layer name should be unique not multiples of the same name). This is only for top-level/root layers, not layers nested inside groups.
Based on a script from @Chuck Uebele
#target photoshop
var toggleLayer = activeDocument.layers.getByName("theLayer");
toggleLayer.visible = toggleLayer.visible === false;
or
#target photoshop
var toggleLayer = activeDocument.layers.getByName("theLayer");
toggleLayer.visible = !toggleLayer.visible;
- Copy the code text to the clipboard
- Open a new blank file in a plain-text editor (not in a word processor)
- Paste the code in
- Save the text file as .txt
- Rename the file extension from .txt to .jsx
- Install, then assign a custom keyboard shortcut to the script:
https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html#Photoshop