How to default destination of newly created file to currently highlighted group (keyboard over mouse)

Hi Devon Folks,

My expectation when creating a new file using a keyboard shortcut is that it will locate itself within the group I presently have highlighted.

Starting here, with a target destination group selected and highlighted –

My keyboard-command-created new file instead locates itself here –

And I have to drag it back to where I want it –

After renaming it for my slip box, I do get my final desired output; so no problem in the end –

But. This required me to use a mouse to re-position the file. I just do prefer a keyboard to drive in most cases.

I have found I can stick with keyboard shortcuts to open the target group into its own window, create my file, name it, close the single-group window in order to return to my preferred three panel view.. Which obviously is an even slower process than the single-drag adaptation to missing the ‘highlight-to-target’ behavior I can picture in my mind.

Have I missed a step or a feature? I attempt to use the ‘Move focus’ commands but that’s not helped.

I’m not sure how you are defining your shortcut, but a quick test with Keyboard Maestro produced the behavior you want as you describe it. Whichever group is selected is where the new file appears.

Yep. What if Searcher wanted to specify the file type on the fly - can this be done in KM? Kind of, dropping a menu?

Sure. I’m certain KBM experts could come up with all sorts of better ways than me, but the switch/case action works as one method. In this case, you’d type shift-command-m then you’d type the first letter and hit return.

1 Like

very cool, thanks!!

Actually, this is behaving as designed.
If that selected group had something in it and it was expanded, the newly created document would have been created inside it. Since it’s empty, the document is created as a sibling item outside it. And if it was collapsed, the document would also be created outside it.

If you double-clicked the group or selected it in the Navigate sidebar to make it the current location, the new document would logically be created inside it.

1 Like

Yep Jim, you’re right of course - and this is also the files/folders paradigm everywhere. I think the OP was thinking of a little customization to override it :slight_smile:

Blame it on DT being so amazing ha ha ha

1 Like

This is a typical case for apps such as KM or BTT.

The selected group is empty. So the new document is created outside.

To automate this it requires the position of the selected group and the position of the new document. Then all that is needed is a drag action that moves the document to the group.

This is what I have as well - neglected to indicate this was my approach.

But I still do not get the behavior I’m after.

(Also, I appreciate the file-type selector you demonstrate below, but not my use case.)

was aware of the behavior as you describe @BLUEFROG : if group already holds contents, then selecting the group does become the target for the new file.

My example is focused on a use case that begins with an empty directory and seeks to remove steps, particularly non-keyboard steps.

As you can see, I begin with a prepared index of groups. Some remain empty. I can return to them as needed.

So, I personally would prefer a design, or at least a design option, where I do not have to do clicking / dragging if it can be helped.

Last note, maybe Keyboard Maestro still might offer another path? Should I find one, I’ll post it here.

Thanks all for pitching in.

You could select the target group in the sidebar?

Or you could use AppleScript/JXA to create a markdown file in the folder selected in the item list.

Sure enough, I’ve gotten what I needed by applying myself a bit more with kM and tracing the path I’d already found.

While I personally think a ‘child-first’ rather than ‘sibling-first’ design makes more sense, this solution gets right to what I needed.

Much thanks again, Forum!

1 Like