Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XCode Simulator: how to change its shortcuts?

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?

like image 847
Joe Huang Avatar asked Dec 14 '15 04:12

Joe Huang


People also ask

How do I create a shortcut in Xcode?

You can add shortcuts using Xcode > Preferences > Key Bindings. Search for the command-name using the field at the top-right, then double click in the key field and type the key you want to use.

How do I move a line in Xcode?

Editor menu > Structure > Move Line Downcommand + option + [ or ] to move a line of code up and down.


1 Answers

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.

like image 79
Jason Avatar answered Sep 24 '22 02:09

Jason