XCode Simulator: how to change its shortcuts?

2020-06-03 08:22发布

问题:

When the simulator in XCode is running, the default shortcuts for rotation are Cmd+Left and Cmd+Right.

Is there any way to change them? For example, change them to Ctrl+Left & Ctrl+Right?

回答1:

I was able to change Simulator shortcuts by doing the following:

  1. Open Simulator
  2. Right click the icon in the tray
  3. Select Options > Show in Finder
  4. Copy Simulator.app to your /Applications directory

At this point, you won't be able to run Simulator.app from the /Applications directory, but that's ok, we're just going to use it there for setting the shortcut(s). To do that, follow the steps you would to change any other app's shortcuts:

  1. System Preferences > Keyboard > Shortcuts
  2. App Shortcuts > add [+]
  3. Select the Simulator.app from the list (wouldn't appear unless we had already completed the steps above.)
  4. Exact name of Menu item and shortcut.
  5. Add

Now go ahead and delete Simulator.app from /Applications. The shortcut will still be changeable and the app will be listed from now on.