I don't use the app myself, but the Tasker app has been around for a while and it's a powerful action-triggering app that does all of these things. I hope Motorola has licensed it instead of coming up with a near-identical copy. It looks like Moto has pre-defined a lot of actions, too.
- Keyboard Shortcuts:
Keep Up with TechRepublic