RobertLowe/hotkeys — pull request #1 by houshuang (2012-02-11 21:29:13+00:00)
Title: Adding ability to target specific application

I am aiming to use Hotkeys to replace Keyboard Maestro for a project where I use AppleScript + Ruby as a glue between different application. I need the ability to target specific applications, so I added this to Hotkeys. The new format for addHotString is

@hotkeys.addHotString("Space+OPTION","com.googlecode.iterm2") do
puts "LOL MACRUBY RUNS"
end

where the second string is the bundleIdentifier, which is optional (default is targetting all applications).

Uses System Events and ScriptingBridge to get frontmost application.