This functionality is only available if you have access for assistive devices enabled.
Here's how you can do this:
- Open /Applications/System Preferences.app
- Click on the "Universal Access" icon (filled, blue circle with stylized human in the middle)
- Make sure the checkbox "Enable access for assistive devices" is checked. You find it at the bottom of the Univeral Access pane.