-- GET AND SET PROPERTIES
tell application "System Events"
tell expose preferences
tell spaces preferences
set spaces enabled to true
get properties
-- {spaces enabled:true, spaces rows:1, arrow key modifiers:«class
-- SET THE PROPERTIES AND APPLICATION ASSIGNMENTS
set properties to {spaces rows:1, spaces columns:3}
set application bindings to {|com.apple.Mail|:1, |com.apple.AddressBook|:1, |com.apple.Safari|:2, |com.apple.Xcode|:3}
-- SET MODIFIERS OF SWITCHING KEYS
properties of arrow key modifiers
-- {class:spaces shortcut, key modifiers:{control}}
set key modifiers of arrow key modifiers to {command}
properties of numbers key modifiers
-- {class:spaces shortcut, key modifiers:{control}}
set key modifiers of numbers key modifiers to {command}
end tell
end tell
end tell
Everything works except the 2 “set key modifers…” lines
I’ve seen numerous other examples of this method for setting spaces key modifiers but none of them work for me.
If anyone can set me straight i’d be much obliged, It’s driving me nuts.
Class spaces preferences object
reduce
Description
user’s spaces application bindings and navigation preferences
* Defined in:
o Expose Preferences Suite
* Inherits from:
o item (Disk-Folder-File Suite) → item (Standard Suite)
Properties
* class (r/o) type class -- The class of the object.
* properties record -- All of the object's properties.
* id (r/o) Unicode text -- the unique ID of the item
* name Unicode text -- the name of the item
* application bindings record -- binding of applications to specific spaces
* arrow key modifiers (r/o) spaces shortcut -- keyboard modifiers used controlling the arrow key navigation through spaces
* numbers key modifiers (r/o) spaces shortcut -- keyboard modifiers used controlling the number key navigation through spaces
* spaces columns integer -- number of columns of spaces
* spaces enabled boolean -- is spaces enabled?
* spaces rows integer -- number of rows of spaces
Notes
* Contained by:
o expose preferences object (Expose Preferences Suite)