Hi, thanks for your reply! (:
I might have been a bit unclear on what I want to do though - I'd like to switch my active layer to the one above or beneath the currently selected one without having to click on it, so that I won't need to move the cursor in between. And I don't think I can record that as an action ):
Oh and brackets are definitely supported, they're just not included in the Norwegian layout because of a few other characters taking their place.
It's weird that on the Norwegian keyboard one can type the "Brackets" using Alt F8 or F9 but photoshop doesn't respond to that shortcut for selecting layers.
Anyway, you could use 2 scripts, one for Select Forward Layer and one to Select Backward Layer, then put them in the photoshop>presets>scripts folder and use Edit>Keyboard Shortcuts to assign a keyboard shortcut to each script.
The following are the script codes for Select Forward and Backward Layers.
Select Forward Layer
// =======================================================
var idslct = charIDToTypeID( "slct" );
var desc52 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref7 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idFrwr = charIDToTypeID( "Frwr" );
ref7.putEnumerated( idLyr, idOrdn, idFrwr );
desc52.putReference( idnull, ref7 );
var idMkVs = charIDToTypeID( "MkVs" );
desc52.putBoolean( idMkVs, false );
var idLyrI = charIDToTypeID( "LyrI" );
var list8 = new ActionList();
list8.putInteger( 18 );
desc52.putList( idLyrI, list8 );
executeAction( idslct, desc52, DialogModes.NO );
Select Backward Layer
// =======================================================
var idslct = charIDToTypeID( "slct" );
var desc53 = new ActionDescriptor();
var idnull = charIDToTypeID( "null" );
var ref8 = new ActionReference();
var idLyr = charIDToTypeID( "Lyr " );
var idOrdn = charIDToTypeID( "Ordn" );
var idBckw = charIDToTypeID( "Bckw" );
ref8.putEnumerated( idLyr, idOrdn, idBckw );
desc53.putReference( idnull, ref8 );
var idMkVs = charIDToTypeID( "MkVs" );
desc53.putBoolean( idMkVs, false );
var idLyrI = charIDToTypeID( "LyrI" );
var list9 = new ActionList();
list9.putInteger( 17 );
desc53.putList( idLyrI, list9 );
executeAction( idslct, desc53, DialogModes.NO );
Just copy the codes above and paste into a text editor or ExtendScript Toolkit and save as a .jsx
For example, i saved each one as Select Forward Layer.jsx and Select Backward Layer.jsx
Then put the scripts in the Photoshop>Preset>Scripts folder and they will show under File>Scripts.
Then using Edit>Keyboard Shortcuts assign whatever keyboard shortcuts you want to the scripts.

