Shortcut to preview in a specific browser?

49 views
Skip to first unread message

Jan Erik Moström

unread,
Apr 29, 2020, 1:20:10 AM4/29/20
to bbe...@googlegroups.com
Is it possible to set a shortcut to a specific browser (for preview)? I
can't find anything about it in the manual (and I wonder if this is the
reason why I have this old AppleScript that I use to preview in Marked
:D )

= jem

TJ Luoma

unread,
Apr 29, 2020, 2:40:49 AM4/29/20
to bbe...@googlegroups.com
I don't know a way to assign a keyboard shortcut to a browser
directly, but that's OK because the preview menu items include the
version number, which change frequently.

But you can create a script to do it, and script can have a keyboard
shortcut, and the script will keep working even when the version
number changes.

#!/bin/zsh -f

/usr/bin/open -a "Marked 2" "$BB_DOC_PATH"

exit 0

Note if you use Marked via 'Setapp' it is referred to as 'Marked' not 'Marked 2'

If you want to use a different app / browser, change 'Marked 2' to the
name of the app / browser.
> --
> This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "sup...@barebones.com" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
> ---
> You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/FE641933-0E9B-4F50-8EED-08618E168CD7%40mostrom.pp.se.

Jan Erik Moström

unread,
Apr 29, 2020, 2:45:39 AM4/29/20
to bbe...@googlegroups.com
On 29 Apr 2020, at 8:40, TJ Luoma wrote:

> #!/bin/zsh -f
>
> /usr/bin/open -a "Marked 2" "$BB_DOC_PATH"
>
> exit 0
>
> Note if you use Marked via 'Setapp' it is referred to as 'Marked' not
> 'Marked 2'
>
> If you want to use a different app / browser, change 'Marked 2' to the
> name of the app / browser.

Yep, I have an AppleScript version that does the same thing ... but I
was wondering why I had it (it's been around for several years with
almost hourly use)

Roland Küffner

unread,
Apr 29, 2020, 12:53:11 PM4/29/20
to bbe...@googlegroups.com
TJ Luoma <luo...@gmail.com> schrieb am Mi. 29. Apr. 2020 um 08:40:
I don't know a way to assign a keyboard shortcut to a browser
directly, but that's OK because the preview menu items include the
version number, which change frequently.

This might be another case for Keyboard Maestro - if you are willing to use a third party tool: it allows you to use regular expressions when defining shortcuts for menu items.

Roland 

Jan Erik Moström

unread,
Apr 29, 2020, 11:16:00 PM4/29/20
to bbe...@googlegroups.com
On 29 Apr 2020, at 18:52, Roland Küffner wrote:

> This might be another case for Keyboard Maestro - if you are willing
> to use a third party tool: it allows you to use regular expressions
> when defining shortcuts for menu items.

Thanks for the tip

= jem
Reply all
Reply to author
Forward
0 new messages