Emacs Anywhere
Configurable automation + hooks called with application information
Emacs Anywhere provides configurable automation and hooks containing window info, so you can bust moves anywhere in a quick, customizable fashion. Open System Preferences and navigate to keyboard > shortcuts > Services. Check the box beside "Emacs Anywhere", click "Add Shortcut" and key a shortcut. In order to use Emacs Anywhere, you must use Xorg as your window manager. You can switch your window manager in Ubuntu by going to the login screen, clicking the cog icon, and selecting Xorg.