Keyboard shortcuts for new window in Chrome or iTerm2
To make a single hotkey always create a new Chrome window, launch Automator. Tell it to create a new Service Have the service take no input. Assign a single action to the service: Run AppleScript (in the Utilities list of actions).
Here is the AppleScript:
on run {input, parameters}
tell application "Google Chrome"
activate
delay 0.1
make new window
end tell
return input
end run
Save the service with a name like "New Chrome Window". Then, in System Preferences assign an unused keyboard shortcut to the service. You can then create a new Chrome window no matter what application you are in.
To improve the service substantially, replace "Google Chrome" with "Safari". :-)
To create a new window in a different scriptable app, replace "Google Chrome" with the name of the app you want to create a new window.
Save these scripts somewhere in AppleScript Editor and assign shortcuts to them with an application like Alfred or FastScripts.
make new window
or make new document
often opens a new window:
tell application "Google Chrome"
make new window
activate
end tell
http://code.google.com/p/iterm2/wiki/AppleScript
tell application "iTerm 2"
tell (make new terminal)
launch session "Default"
end tell
activate
end tell
There's a bug where shortcuts for Automator services don't always work until the services menu has been shown once from the menu bar. Automator services also have small delays and they don't work when the frontmost application doesn't have a menu bar or a services menu.