My favorite use of this feature is assigning actions to the top row of keys on my keyboard. That way, I can reassign certain function keys I don't use like F4, which triggers the Dashboard , to something useful like putting my computer to sleep. You can, of course, assign whatever actions whatever shortcut you want—that's what customization is all about!
While AppleScript can do a lot of things, there are a few common actions that lend themselves to Triggers in Quicksilver. You can use it to emulate other keyboard shortcuts, making existing shortcuts global, and or perform more complicated tasks with just a keystroke or two.
How to use the function keys on your Mac
Here are some example scripts that can act as templates for your own actions. Furthermore, if it's a shortcut you need to run often, you probably don't want to be stretching and hitting multiple keys day in and day out. Luckily, we can just whip up a little script that presses those keys for us and assign it to a simpler hotkey of our own. Since I have to take a lot of screenshots working at Lifehacker, I've changed the Print Screen aka F15 button on my Windows-based keyboard to a quick screenshot key on my Hackintosh.
System Events is what handles things like keystrokes, and key code 21 refers to the "4" key. Sometimes, you'll just be able to type in the key you want see the mini player script in the section below , but some keys require you to use their codes. Check out a full list of key codes here , or download Full Key Codes to find them yourself.
You can also find Apple's full list of existing keyboard shortcuts at their web site. Some apps have nice shortcuts built-in, but don't apply globally—meaning the app has to be in focus for you to be able to use the shortcut. This isn't ideal for a lot of apps—say, music players—so we're going to make those shortcuts global by writing a short script that executes them for us no matter what window has focus.
A good example of this is if you're using a music player other than iTunes.
So, we'll just use AppleScript to call on its menu options for us using the following script:. Since that menu bar option will only be available if Clementine is the active window, we first have to tell OS X to focus it with the activate command. Then, we just pick our menu bar item from Clementine we want to assign to the shortcut. In this case, the "Previous Track" item from the "Music" menu. For the sake of being thorough, here's a similar script I use to quickly switch between the mini-player and full player versions of iTunes. Notice that since "m" is actually recognized by AppleScript, I don't need to find its key code.
As such, the command I use to emulate hitting that key is keystroke as opposed to key code , as we used in the above two examples. The activate command we used above does two things: it focuses an app if it's open, or it starts an app if it isn't open. Thus, if you have apps you open and close a lot, we can give them a global keyboard shortcut by creating a simple AppleScript:.
Turn Any Action Into a Keyboard Shortcut on Your Mac
While you could use Quicksilver's built-in "open" function to start an app with a trigger, this does a bit more. For example, your shortcut key will not only open the app, it will also focus or unminimize it if its already running—so you still only have one place to go on the keyboard to get access to that specific app. This command is much more useful, however when you couple it with other tasks—like if you want to start up an app and close it quickly.
That's fine, except I need to start up its driver app if I want to connect to a Wi-Fi network. Orc4hire Orc4hire 1, 10 10 silver badges 6 6 bronze badges.
Examples of Useful Scripts
Lri Lri See full Keyboard Access at the bottom of the following screenshot: When a prompt window like the one you included appears, the selected button will be highlighted in blue. Screenshot: Then you press the space to action that button. Thanks Am1rr3zA for the previous edit but I discovered my answer didn't work so I amended it. Tab to move to the next dialog box. Space to select. Frederiko Frederiko 2 2 bronze badges. As stated by the answers above, this doesn't just work out of the box.
You have to enable it in System Preferences. Medical School or Games Industry?
Turn your Mac function keys into shortcuts to work faster
Featured on Meta. Custom Filters release announcement. Linked 0. Related 1. Enter your email address below:. Unfortunately, the escape button no longer close dialog all the time, sometimes it gives me the idiotic list of suggested words.
Sleep, log out, and shut down shortcuts
I found this article while trying to solve this horrible problem. Apple forgets that they have power users. In time, I suspect that there will not be a Mac OS or new hardware to run it on. Pointing out the use of spacebar to select was exactly what I needed to know, as everything else was already set up. Unfortunately this no longer works on High Sierra.
- moving itunes to another mac.
- save web page to desktop mac.
- How to customize Mac keyboard shortcuts to work faster.
- unlock ipod classic on mac;
- download games for mac os x 10.6.
Another score against efficient work-flows by those geniuses at Apple. Thank you very much for it. Name required. Mail will not be published required. All Rights Reserved. Reproduction without explicit permission is prohibited.