In Xcode 6, how do I use the hardware keyboard but

2019-02-21 16:23发布

问题:

In Xcode 6, the iOS simulator seems to either show no keyboard, meaning you can type but can't see the positioning and effect of the software keyboard, or it shows the software keyboard, meaning you can see it on the screen, but can't type on it - and typing on the soft keyboard with the mouse is really slow!

How do I get the old behaviour back, where you can see the software keyboard, but type on the hardware one?

回答1:

  1. Go to the simulator's Hardware menu.
  2. Make sure Connect Hardware Keyboard is checked.
  3. Choose Toggle software keyboard

By default the hardware keyboard is connected, but the software keyboard is not toggled on. I'm pretty sure this is new behaviour.



回答2:

Or you can just use hotkey: command + K



回答3:

With the iOS Simulator.app shipped in Xcode 6, the mac's keyboard now interacts with the simulated runtime the same way a bluetooth keyboard interacts with a real device. You can attach and detach the hardware keyboard from the simulator app's Hardware->Keyboard menu.

If the hardware keyboard is not connected, you can only interact via touch. If the hardware keyboard is connected, you can show/hide the software keyboard with the cmd-k shortcut key (just like how you can double tap eject on a bluetooth keyboard on a real device)