User-defined command for qualifier keys

Hi. I'm new to Directory Opus.

For opening folders, I like to use the following setting: doubleclick to open in existing tab (default), ctrl+doubleclick to open in newtab, alt+doubleclick to open in newtab=nofocus and shift+doubleclick to open in newtab openindual. I've set this in settings > file types > all folders and it's working fine.

I'd like to do the same for buttons (which I intend to use as shortcuts to folders). I've created a few buttons by using the @keydown and keyargs.

How can I create a new user-defined command (like usequalkeys) to accomplish this so that I don't need to use @keydown or keyargs every single time? I could just type something like "Go /mydocuments NEWqualkeys" and that would be it. In other words, a user-defined alternative to usequalkeys.

I tried creating a new user-defined command but it didn't work. Can someone here please guide me?

1 Like

What you're trying to do is to extend existing commands with a new argument.
That's not possible at the moment "from a general point of view".

But, for one specific command, you could create your own command (e.g. MyGo) and put the specific behaviour for each of the qualifiers inside this new command that would then invoke the proper Go command inside depending on these qualifiers.

What was the command you created?

Can you give more detail on how it didn't work?

Thanks for the reply.

I tried what you said but I got an error. I'm sure what I did was wrong !!! But this is how I defined the MyGo command: go keyargs "ctrl:newtab" "shift:newtab openindual" "alt:newtab=nofocus"

I then created a new button and tried to use the MyGo command to open a folder: MyGo PATH="E:\TV"

Nothing happens. I guess I'll have to find a way to make it accept the path for every new button I want to create. I have no idea how to do it.

Thanks for the quick reply Leo.

I'm not a programmer, so I'm sure I used arguments/commands in a way that they weren't meant to be !! I created a new command NEWQUALKEYS and defined it as: keyargs "ctrl:newtab" "shift:newtab openindual" "alt:newtab=nofocus"

When I added this to a button and ran it, I got an error saying that "windows cannot find keyargs". From this error, I understood that windows was either looking at keyargs as a windows command (or a path) and hence the error. But I don't know how to fix it.

You need to pass the path to the user command.

Docs: User Commands

1 Like

Thanks for the replies. I'm sticking to using keyargs and it works perfectly fine.

I'd like to know one thing though: How can I make the items in the Quick Access location (accessed using the alias /quickaccess) work in the same way i.e. custom ctrl, shift, alt, functions? I'm asking this because the items in Quick Access don't seem to be treated as folders in Directory Opus.

Also, the "/" key used for aliases doesn't work in the Quick Access location.