Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.5: Switch Spaces using fn keys with Quicksilver Apps
Adding to the multiple ways to switch spaces: here's a way to do it with just Blacktree's Quicksilver, without running any (other) third party apps.
  1. In the Spaces control panel, set control-number keys to switch directly to a space.
  2. Add a Quicksilver trigger, with this text (type dot and then this text): tell application "System Events" to keystroke (ASCII character 49) using control down
  3. Set the action as "Run as AppleScript"
  4. Set the trigger to use a keypress, then (you might have to hit the (i) icon to get the sidebar to pop out) set it to F1, and make sure you set it to activate on release.
  5. F1 should now jump to space 1.
Do the same for F2, but with ASCII 50, and so on. You're just telling it to hit the control-n when you hit the function key. On my machine it's a little pokey -- there's probably a way to make it quicker.

[robg adds: From the queue review site, a commenter notes that you don't have to use the ASCII values; you can just use ...keystroke "1".... I haven't tested this hint.]
    •    
  • Currently 2.83 / 5
  You rated: 1 / 5 (6 votes cast)
 
[12,267 views]  

10.5: Switch Spaces using fn keys with Quicksilver | 10 comments | Create New Account
Click here to return to the '10.5: Switch Spaces using fn keys with Quicksilver' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Switch Spaces using fn keys with Quicksilver
Authored by: Anonymous on Feb 22, '08 07:10:25PM
You can change the ASCII code 49 to:

tell application "System Events" to keystroke "1" using control down
A bit easier to read.

[ Reply to This | # ]
10.5: Switch Spaces using fn keys with Quicksilver
Authored by: DigiDemon on Feb 25, '08 09:39:31AM

What version of Quicksilver? I tried the beta and wow did it suck...kept crashing.



[ Reply to This | # ]
10.5: Switch Spaces using fn keys with Quicksilver
Authored by: asmeurer on Feb 22, '08 08:27:33PM

This doesn't let me make Spaces 1-3 respond to 4-6 and vice-versa. I use the numeric keypad, and I hit the number that corresponds to the location of the space, but since the numbers are upside down on the keypad, I always get the wrong space.

Is it possible to access the Spaces menu with AppleScript perchance?



[ Reply to This | # ]
10.5: Switch Spaces using fn keys with Quicksilver
Authored by: thebackwash on Feb 22, '08 09:52:26PM

Maybe someone could help me. I've had this long-standing problem where I can't get applescripts to run by double-clicking them, opening them with 'open' in the Terminal, or by any other means that calls the system's open file call. Instead, it launches script editor and opens the script there. I have found that saving the script as an application gives the desired effect, but it takes like 5 seconds to start up, which makes this hint absolutely useless. Can anyone help me, or is this behavior normal?



[ Reply to This | # ]
10.5: Switch Spaces using fn keys with Quicksilver
Authored by: asmeurer on Feb 23, '08 10:58:00AM

There is a program in /System/Library/CoreServices/ called "AppleScript Runner." See if that does what you want.



[ Reply to This | # ]
10.5: Switch Spaces using fn keys with Quicksilver
Authored by: thebackwash on Feb 23, '08 08:52:56PM

No luck. Dragging and dropping will not launch the script, and I can't change the application for .scpt files to this in the get info window either, even if I select "show all applications."



[ Reply to This | # ]
10.5: Switch Spaces using fn keys with Quicksilver
Authored by: mark hunte on Feb 24, '08 09:37:00AM
This is Normal behaviour.
The .scpt files can be run from within Script Editor, or From a Applescript Menu.
There are ways to call them from Terminal, but it depends on your version of OS X.

This hint talks about using the code rather than a file in Quicksilver.

What this means is QuickSilver can trigger the code to run, using its own set of keyboard shortcuts.
There are other apps that do this also.

To learn more about Applescript try here : http://applescriptsourcebook.com/
They have AppleScript Tutorials for Beginners and Much more

---
mh

[ Reply to This | # ]

10.5: Switch Spaces using fn keys with Quicksilver
Authored by: asmeurer on Jul 09, '08 03:44:18PM

The title of this hint is misleading. There is a "fn" key on just about all new Apple keyboards that has nothing to do with this hint. What it really should say is "F-keys".

Kind of annoying when I think I'm getting something I don't when I open a hint, that's all.



[ Reply to This | # ]
10.5: Switch Spaces using fn keys with Quicksilver
Authored by: sgleadow on Dec 04, '08 06:00:46PM

I know this thread is a little old, but I just tried the above and it almost worked. It does work, but I have to press the function keys twice, which is a little annoying.

I tried getting the apple script to send the keystroke twice, but that didn't work. Perhaps Quicksilver is missing the keystrokes, though it never does when I use it for launching apps.

Are there any settings or scripts to work around this? I assume others are not having the same problem.



[ Reply to This | # ]
10.5: Switch Spaces using fn keys with Quicksilver
Authored by: sgleadow on Dec 04, '08 08:11:54PM
I sort of solved my own problem, well, found a different way of achieving the same result, and am posting for anyone else who may be trying to solve this problem. I manually edited ~/Library/Preferences/com.apple.symbolichotkeys.plist to change the Spaces hotkeys to be the function keys with no modifier.

Some info on how to do this was taken from:
http://www.xlr8yourmac.com/tips/remap_function_keys.html

The relevant numbers in the plist file for my 8 spaces (on my machine at least) were 118-125. There are three parameters: 65535 (not sure what this means), hotkey#, modifier.

The modifiers are (taken from the site above, I only checked a few of them):
None - 0 (what I used)
Command - 1048576
Shift - 131072
Control - 262144
Option - 524288

The key numbers to use the function keys are possibly different for different keyboards? mine were:
F1 - 122
F2 - 120
F3 - 99
F4 - 118
F5 - 96
F6 - 97
F7 - 98
F8 - 100

Once I hacked this file, I logged out and in again before the shortcuts would work. It seems to be working fine, and I don't seem to have broken anything else!

Now to get rid of those annoying sliding transitions...

[ Reply to This | # ]