Focus Live Search when switching to Bookends

Hi, I use ⌘Y to switch to Bookends for inserting citations a lot. One annoyance is that Scrivener doesn’t focus the live search, so you can’t ⌘Y then type the name of the ref, you need to click with the mouse, or as i recently found use ⌘⌥F.

It would be great if Scrivener could switch to bookends and focus the live search field just using ⌘Y.

See this forum post on the bookends forum: sonnysoftware.com/phpBB3/vi … f=2&t=3978

If it isn’t a Bookends function, I don’t know how it could be done from our side in a safe manner. Cmd-Y just sends a request to the system to activate or launch the software that has been assigned to that shortcut (it is, internally speaking, identical to double-clicking on Bookends from Applications or clicking on its icon in the Dock). That can be Calculator.app for all Scrivener cares (I use it to summon Firefox since much of what I write into Scrivener ends up getting dumped into a browser and posted :wink:). Thus the target program would have to have a special way of activating itself with certain elements inside of its UI focussed, which Jon mentioned there being no setting or mode for.

Presumably he meant we’ve have to script the target software after activating it, and that wouldn’t be impossible, but then we’re getting to very specific implementation details on a feature that, as I say, could just as well be aimed at another program that may not even have a search feature with that shortcut. In my example, if Scrivener fired off an Opt-Cmd-F at Firefox after switching, I’d lose my page and have it replaced with the generic built-in search page, other programs may just cause an error box to appear every time you hit Cmd-Y.

OK, so basically there is no clear Apple API that you can use to safely bind this to the target app. An program can’t know who or what brought it to the front, therefore unless you do something hacky, you can’t customise the activation behaviour. Thanks for the explanation. Perhaps an Applescript interface in Bookends would be a workaround, but this seems throwing too much work at too minor a feature. I’ll put up with it…

I had the same issue, and solved it using Keyboard Maestro.

The macro is triggered when I hit a shortcut. It selects the Author’s surname that I have just typed, pops over to Bookends, focuses the search bar, pastes the text (Author), and hits enter for me. Saves a couple of clicks, but over time, it adds up quickly.

If I have recently inserted that particular Citation already, I simply invoke Alfred’s clipboard history manager, and start typing the surname there - it quickly parses through until the relevant entry is all that remains, hitting Enter then inserts it. At most, I might need to adjust the page references.

With these two approaches combined, I’ve sped things up significantly.
Figured I’d simply mention it here, as an alternative!

Doesn’t Bookends have some shortcut to invoke searches from anywhere? In Papers it’s ctrl+ctrl which opens a Papers search field, where ever I am.

Cassady: thanks for that. I was hoping to get this done natively, but I think I will go your route, exchanging KM for Quicksilver which I use for these kinds of tasks. Thanks for the reminder.

Lunk: BE doesn’t have a universal search, it is linked to the word processor and requires two key presses before you can actually search (unless you use Cassady’s workflow). Papers by default is better in this regard…

I’ve made a couple of applescripts, one of which does something similar to Cassady’s workflow (though I use regular expressions to clean up the text before pasting it in bookends):

viewtopic.php?f=18&t=34095&p=212036#p212036

Hi there:

I recognize this comment comes almost four years too late, but I’m going to post it anyway for future reference. As lunk mentioned, pressing the control key twice activates what Bookends calls floating citations: “You can access your reference library at any time from any application (typically a word processor) via a floating window that is invoked by double tapping a trigger key. By default this is the Control key, but in preferences (Scan & Bib tab) you can assign any of these keys: Shift, Control, Option, Command, and Caps Lock” (Bookends v13.4.8 User Guide 44).

(I myself discovered this functionality, to my delight, by accident!)

All best,
Poldy

Bookend’s floating citations window was added in Version 13.1.2 (July 28, 2018; github.com/iandol/bookends-tools