Hotkeys for go expandbranch

I'm trying to set it up so that when I am in detailed view, I can use the arrow keys to navigate through with the ability to expand and collapse folders using right & left arrows (instead of having to use the "Alt+up" and "Alt+Down" hotkeys).
getting this set up was easy enough, just adding hot keys for "left arrow" and right "arrow".

However, this means that when I'm in thumbnail view, I can't move from file to file with the arrow keys, as this now only expands/collapses the folders.

Is there a way to have the hot key not work in the thumbnail view?
I've tired using:
@ifSet VIEW=Details
go expandbranch
But that syntax doesn't seem to effect hotkeys, or maybe I'm using it wrong.

In hotkeys, you need to use the Evaluator, e.g.:

=return IsChecked("Set VIEW=Thumbnails") ? "Select NEXT" : "Go EXPANDBRANCH"

Not sure if assigning hotkeys to the cursor keys (without anything else held down) is a good idea. It will probably break the folder tree, for example.

Thanks for this. using Directory Opus is daily think for me, but customizing it and trying to understand the functions is a hobby that I don't have time for every week. So I finally got around to reading up on the Evaluator function, and now I've got it working like I want.

Leo, you are correct, this does mess up navigating the folder tree using the arrow keys, which was not something I had every used before.
So far, I can't see any other issues.

In the end I reversed the order of the hot keys so it is only active when "details" view is used.

left arrow:

=return IsChecked("Set VIEW=Details") ? "Go expandbranch=collapse" : "Select PREV"

right arrow:

=return IsChecked("Set VIEW=details") ? "Go EXPANDBRANCH" : "Select NEXT"