Shortcut for drag-and-drop selected file to current window

General discussions about LaunchBar
sashabe
Posts: 6
Joined: Mon May 05, 2014 11:08 am

Shortcut for drag-and-drop selected file to current window

Postby sashabe » Mon May 22, 2017 11:54 am

Is there such a command to drop a file selected in Launchbar to the window in foreground? To clarify, it's the same as drag-and-dropping a file currently selected in Launchbar with a mouse to any window — but from keyboard.

Consider such usage scenario:
1. I "put" a file to Launchbar from Finder by using the Instant send shortcut (say, an image);
2. I want to open this file in an app by focusing this app window (say, Photoshop), opening Launchbar (which retains the sent file as currently selected) and dropping the file into the Photoshop window underneath the Launchbar window, issuing a command from keyboard.

Is it possible? I tried a wealth of existing commands via combinations such as Shift-Enter, Enter, Space, and so on, but they don't seem to do what's needed.

It is

Thanks!

mot
Rank 1
Rank 1
Posts: 32
Joined: Wed Jan 11, 2017 4:51 am

Re: Shortcut for drag-and-drop selected file to current window

Postby mot » Mon May 22, 2017 12:36 pm


For me it works perfectly fine with ⇧⌘C and ⌥⇧⌘C.

Screenshot 2017-05-22 at 12.19.56-pty-fs8.png
Screenshot 2017-05-22 at 12.19.56-pty-fs8.png (12.43 KiB) Viewed 628 times

It may not work with all apps, but just tested it with Photoshop and Affinity Photo:

1. Send an image file from the Finder to LB (Instant Send).
2. Open any document in Photoshop.
3. Re-invoke LB, the previously sent file is still preserved.
4. Type ⌥⇧⌘C.

– Tom

sashabe
Posts: 6
Joined: Mon May 05, 2014 11:08 am

Re: Shortcut for drag-and-drop selected file to current window

Postby sashabe » Mon May 22, 2017 2:11 pm

Thanks! But for some reason this doesn't work for me (both Copy and Paste File and Copy and Paste File Contents commands). It works as it should (pasting a file) in Finder, but it doesn't open the files in Photoshop/Sublime Text/browsers such as Google Chrome or Safari. It simply pastes the path or file itself in those apps — a behaviour which seems correct to the description of those commands, but it does not do what I have in mind — opening the file.

I'm interested though how it manages to work for you with the same app (Photoshop). Maybe your version of Photoshop supports pasting copied files to an empty window and mine does not? Mine is the latest CC.

mot
Rank 1
Rank 1
Posts: 32
Joined: Wed Jan 11, 2017 4:51 am

Re: Shortcut for drag-and-drop selected file to current window

Postby mot » Mon May 22, 2017 3:20 pm

sashabe wrote:Maybe your version of Photoshop supports pasting copied files to an empty window and mine does not? Mine is the latest CC.


What I described was for adding the sent document to an already open window. See step 2 of my instructions.
That is, in PS for example, it will create a new layer with the image file from LB.

If you simply want to open a file in PS (or any other app), then just send the file to the app:

1. Select file X in Finder.
2. Instant-Send file X to LB.
3. Still in LB, instant-send file X to any app:
 a. While file X is still focused in LB hit the Tab key
 b. Forward-type to the app you want to open the file with (e.g. Photoshop)
 c. Once the app is focused hit Return

This will open the file in a new window (= as new document), instead of pasting it into an existing one.

– Tom

sashabe
Posts: 6
Joined: Mon May 05, 2014 11:08 am

Re: Shortcut for drag-and-drop selected file to current window

Postby sashabe » Mon May 22, 2017 4:27 pm

Forward-type to the app you want to open the file with (e.g. Photoshop)


That's what I was trying to avoid — it's less mental effort to me to just switch to an already open app then to recall its name and type it. Anyway, thanks! I guess writing a simple script could resolve this.

mot
Rank 1
Rank 1
Posts: 32
Joined: Wed Jan 11, 2017 4:51 am

Re: Shortcut for drag-and-drop selected file to current window

Postby mot » Mon May 22, 2017 7:46 pm

sashabe wrote:That's what I was trying to avoid — it's less mental effort to me to just switch to an already open app then to recall its name and type it. Anyway, thanks! I guess writing a simple script could resolve this.


Well, in that case just press ⌘R to bring up the list of running applications (see also here).

So, replace step 3b (‘forward-type…’) with ‘press ⌘R’.

– Tom

sashabe
Posts: 6
Joined: Mon May 05, 2014 11:08 am

Re: Shortcut for drag-and-drop selected file to current window

Postby sashabe » Mon May 22, 2017 7:56 pm

Aha! Thanks Tom. Because the list of running apps is sorted by app activation time, every time we invoke LB and press tab and Cmd+R, we also need to press arrow up key to get the last app selected. A bit lengthy, but still maybe better then trying to recall the app. I need to see how it works out in long term.

Thanks for a lot of good tips!

mot
Rank 1
Rank 1
Posts: 32
Joined: Wed Jan 11, 2017 4:51 am

Re: Shortcut for drag-and-drop selected file to current window

Postby mot » Mon May 22, 2017 8:20 pm

sashabe wrote:A bit lengthy,[…]


Yeah, that’s why I didn’t mention it before. For me it’s much more convenient to just type the abbreviation of an app, e.g. “ps”. Recalling its name/abbreviation usually is not a problem, because when I’m doing an “open with…” I know beforehand with which app I want to open the document. But that’s just me :wink:

– Tom


Return to “LaunchBar General”

Who is online

Users browsing this forum: No registered users and 4 guests