I am trying to implement a "Command-tab" style setup that works only within a specific space. For most apps, "Ctrl-F4" which is "move focus to active or next window" works correctly, but for emacs/aquamacs it does not (as the keypress is absorbed by the app). (System Preferences->Keyboard->Shortcuts->Keyboard lists this option). I want this to go between the windows I've organised into a space as relevant, i.e. my R script, plots in X11 and in png/pdf format.
I can run an arbitrary applescript with fastscripts or other apps on a keypress. I therefore see two options:
- Tell the window manager directly to perform the move focus, WITHOUT going via a keypress
- Use a keypress but checking for aquamacs as the active window. On finding aquamacs, get a list of the processes in the current space and move to the next one. (checking for aquamacs seems wise as the default behaviour is likely faster than this lookup)
Searching for these behaviours is difficult, and the applescripts documentation is byzantine to a newbie, so I don't see how to achieve either of them.