Hotkeys

General discussions about LaunchBar
Post Reply
spewingnonsense

Hotkeys

Post by spewingnonsense » Mon Jan 07, 2008 11:55 pm

Hi!

I just started exploring Launchbar today and I really like its simplicity. However, the one thing that I was using quicksilver for that I really hope exists in Launchbar is customizable hotkeys. With quicksilver, I have it set up so that when I hit Option-Command-Space, it Play/Pauses iTunes.

I know that I can navigate to the play/pause applescript within Launchbar's Interface, however, is there any way I can have this just as a hotkey that I can press without worrying about typing anything into the LaunchBar window?

Thanks,
Matt

norbert
Objective Development
Objective Development
Posts: 648
Joined: Thu Nov 09, 2006 6:30 pm

Post by norbert » Tue Jan 08, 2008 8:03 pm

Right now, the most efficient approach to accomplish hotkey like functionality with LaunchBar is a combination of single letter abbreviations and Instant Open.

For example, select the Play/Pause script in LaunchBar, press Command-Option-A to invoke "Assign Abbreviation", and choose P as the abbreviation for this script. You can now quickly run this script by opening LaunchBar with Command-Space, then press and hold P.

The upcoming LaunchBar version 4.4 will make this approach even more efficient as it will allow you to activate LaunchBar with a short tap on a modifier key such as Command or Control.

Dr. Drang

Try FastScripts Lite

Post by Dr. Drang » Wed Jan 09, 2008 3:43 pm

FastScripts Lite is a free utility that lets you assign keyboard shortcuts to as many as 10 AppleScripts. Since switching from Quicksilver to LaunchBar, I've been using FastScripts to replace QS's hotkeys and get one-key access to my iTunes control scripts. I've been very happy with its speed and stability.

Guest

Re: Try FastScripts Lite

Post by Guest » Mon Jan 21, 2008 12:07 am

Dr. Drang wrote:FastScripts Lite is a free utility that lets you assign keyboard shortcuts to as many as 10 AppleScripts. Since switching from Quicksilver to LaunchBar, I've been using FastScripts to replace QS's hotkeys and get one-key access to my iTunes control scripts. I've been very happy with its speed and stability.


This is the same situation for me. I created 3 AppleScripts: Play/Pause, Next, Previous and put them into an iTunes folder in my Scripts Folder. Using the wonderful FastScripts Lite, I assigned keys to each. I prefer this setup to quicksilver as Launchbar is so fast and Quicksilver so buggy.

Here is the Play/Pause script that I cobbled together to show album artwork via Growl. The Next and Prev are the exact same, just replace the "playpause" command sent to iTunes.


Code: Select all

tell application "iTunes"
   playpause
   if player state is playing then
      set theArtist to artist of current track
      set theSong to name of current track
      set theAlbum to album of current track
      set artworkData to 0
      if (count of artwork of current track) > 0 then
         set artworkData to data of artwork 1 of current track
      end if
      
      tell application "System Events"
         if exists process "GrowlHelperApp" then
            tell application "GrowlHelperApp"
               set the allNotificationsList to ¬
                  {"Next Track"}
               
               set the enabledNotificationsList to ¬
                  {"Next Track"}
               register as application ¬
                  "ITunesNotify" all notifications allNotificationsList ¬
                  default notifications enabledNotificationsList ¬
                  icon of application "iTunes"
               if artworkData is not 0 then
                  notify with name ¬
                     "Next Track" title theSong ¬
                     description theArtist & "
" & theAlbum ¬
                     application name ¬
                     "ITunesNotify" pictImage the artworkData
               else
                  notify with name ¬
                     "Next Track" title theSong ¬
                     description theArtist & "
" & theAlbum ¬
                     application name "ITunesNotify"
               end if
            end tell
         end if
      end tell
   end if
end tell


takeo
Posts: 3
Joined: Sat Mar 15, 2008 7:10 am
Contact:

Post by takeo » Sat Mar 15, 2008 7:13 am

norbert wrote:The upcoming LaunchBar version 4.4 will make this approach even more efficient as it will allow you to activate LaunchBar with a short tap on a modifier key such as Command or Control.

Oh man, you just made me so happy about my decision to recently switch back to LB after using quicksilver for a few years. My main point of contention was that I was so used to invoking QS with a quick tap on the command key and I'd have to break that habit with LB...then I see this. Awesome! Now, hopefully 4.4 comes out soon :)

SirPavlova
Posts: 3
Joined: Sun Jun 08, 2008 4:34 pm

Post by SirPavlova » Sun Jun 08, 2008 5:26 pm

Here's hoping it'll work with the Fn modifier as well... pretty please with sugar on top? Like takeo, I was invoking QS this way... it's good to hear it'll be possible in LB too soon.

norbert
Objective Development
Objective Development
Posts: 648
Joined: Thu Nov 09, 2006 6:30 pm

Post by norbert » Sun Jun 08, 2008 5:54 pm

SirPavlova wrote:Here's hoping it'll work with the Fn modifier as well...

Yes, it will work with any modifier, including fn.

SirPavlova
Posts: 3
Joined: Sun Jun 08, 2008 4:34 pm

Post by SirPavlova » Sun Jun 08, 2008 7:10 pm

Yes, it will work with any modifier, including fn.

Thanks. :)

ludwigschubert
Rank 4
Rank 4
Posts: 285
Joined: Fri Jun 29, 2007 5:54 pm
Location: Germany, Bavaria

Post by ludwigschubert » Mon Jun 09, 2008 11:24 am

Excuse me for being stupid, but does "all modifier keys" include caps lock?
It would be so cool to disable caps lock and use it only for LaunchBar!

SirPavlova
Posts: 3
Joined: Sun Jun 08, 2008 4:34 pm

Post by SirPavlova » Mon Jun 09, 2008 1:11 pm

ludwigschubert wrote:It would be so cool to disable caps lock and use it only for LaunchBar!

I never thought of that! I've got caps lock remapped to control, but that's a fantastic idea!

Futhermore, if LaunchBar hooks the keys at a low enough level, could it work in such a way that I can remap the physical caps lock key to control & use the actual control key to invoke LB? I presume you're using event taps a la QS, but I've no idea if that's low enough to accomplish such a feat. On second thought there's not much point, since function & control are adjacent, but on third thought, I used to get QS popping up if I muted via Fn+F3 or something & didn't lift my finger off the function key quickly enough. The function key can never be dedicated, but control can... well, if caps lock is remapped to do its job. You get the idea.

Post Reply