programsoftgo.blogg.se

Keystroke to get for mission control on a mac
Keystroke to get for mission control on a mac






keystroke to get for mission control on a mac

This is not strictly true: To move down one row, you just move 3 spaces right, so in principle you could just bind something like tell application "System Events" to tell process "WindowServer" You say that you "need to to detect the current space #". So it looks like it'll require some SIMBL hacking of Dock to gain access to WVSpaces. Only one space gets displayed at a time (this holds true if you're using multiple monitors the space spans across both of them), so it makes sense to only have one WVSpaces instance.

#KEYSTROKE TO GET FOR MISSION CONTROL ON A MAC HOW TO#

The trick is, how to get access to the private WVSpaces class buried inside of Dock? I'm assuming it's Singleton as it has an NSMutableArray *_spaces attribute, probably with every space listed in it. NSString *currentSpaceUUID = // Empty string if main space?

keystroke to get for mission control on a mac

So theoretically you can get the current space number like so: WVSpace *currentSpace = currentSpace] WVSpace *previousSpace // Space on the left?Įach WVSpace class has an NSString *_uuid attribute, which is likely its SpaceUUID. WVSpace *nextSpace // Space on the right? It has a number of attributes including: WVSpace *currentSpace Inside Dock there's a class called WVSpaces. I'll keep looking at it tomorrow too tired now. There's a class called WVSpace which appears to represent a single Space in Mission Control, and a lot of other WV* classes. You can see the spaceUUID strings appearing in there. That'll spit out all of its header files (it's long almost 7,500 lines).

  • Copy and paste the Dock binary to your desktop.
  • Go to: /System/Library/CoreServices/Dock.
  • It looks like Dock controls Mission Control.

    keystroke to get for mission control on a mac

    This is probably something that can be done with Cocoa, perhaps via private API, but I'm not sure about AppleScript. I took a quick glance through the AppleScript Editor Library (Window -> Library) and didn't see any entries under System Events for spaces. I'd assume that no uuid means Display 1, and the others' mean Display 1+n.

    keystroke to get for mission control on a mac

    I'm not sure if there's a public API to figure out what space uuid is being displayed on a display. Again, there's never an entry for Desktop 1 or Dashboard. If you add a space, an entry will be added. If you delete a space, that entry will get removed from the file. I have four spaces enabled, and three entries show up: $ defaults read You can read them here: $ defaults read įile locations: ~/Library/Preferences/ except for the very first one (AFAIK), and the Dashboard one.

  • Each Mission Control "space" gets a uuid assigned to it.
  • Not there yet, but in the right direction: If it's at all possible, I'd rather just bind a few keys to an applescript. I've re-mapped all my spaces to use the number pad, which partially takes care of the problem (since it is a 3x3 grid), but only when I have an external keyboard attached.īasically, I want to be able to use ALT+ ↑ and ↓ again, but to do so I need to detect the current space # so that I can switch from space 5->2, for example.ĭave's answer below, although far more detailed than I expected, requires writing an app to do this (plus it still doesn't fully answer the question). Now I'm stuck with this clunky 1x9 array of spaces instead of an elegant 3x3 grid. I used to navigate between spaces using arrow keys (e.g. I want my spaces "grid" back since I used it all the time. I hate the new mission control in OSX 10.7. "System Events") this very specific thing" and I've no clue how I would actually figure that out. I've written a few applescripts, but more often than not it seems like any time I need to do something new (that I can't find dictionary documentation for) it falls under the category of "tell this specific app (e.g. Source would be helpful, but more helpful would be info on how to figure this out myself. I'm trying to figure out how to get the current space # from mission control.








    Keystroke to get for mission control on a mac