xcode Mac 键盘快捷键不适用于 iOS 模拟器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/47044924/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 10:23:58  来源:igfitidea点击:

Mac keyboard shortcuts not working on iOS Simulator

xcodekeyboardios-simulatormacos-high-sierra

提问by Ashok

All the mac keyboard short cuts like Cmd+ Q(Quit Simulator app), Cmd+ K(Toggle keyboard hide/show in Simulator) etc has stopped workings for iOS Simulator app since this morning suddenly.

从今天早上开始,所有 mac 键盘快捷键,如Cmd+ Q(退出模拟器应用程序)、Cmd+ K(在模拟器中切换键盘隐藏/显示)等都突然停止了 iOS 模拟器应用程序的工作。

All other apps, including Xcode, shows the shortcut in menus and they are working fine.

所有其他应用程序,包括 Xcode,都会在菜单中显示快捷方式,并且它们运行良好。

I noticed, the shortcut keys shows up against menu items momentarily on launch of simulator but then disappears completely (see attached)...

我注意到,快捷键在模拟器启动时会暂时显示在菜单项上,但随后完全消失(见附件)...

enter image description here

在此处输入图片说明

I tried following but no success...

我尝试了以下但没有成功...

  • Launch simulator (Open Xcode project and then menu Product > Run. And, directly through menu Xcode > Open Developer Tools).

  • Erase All Content and Settings in Simulator...

  • Restart Mac

  • 启动模拟器(打开 Xcode 项目,然后菜单 Product > Run。然后,直接通过菜单 Xcode > Open Developer Tools)。

  • 清除模拟器中的所有内容和设置...

  • 重启 Mac

Xcode 9.0.1 (9A1004) | Mac 10.13 (17A405)

Xcode 9.0.1 (9A1004) | Mac 10.13 (17A405)

回答by russbishop

You might have enabled (checked) the "Send all keyboard shortcuts to device" mode. It's in the Hardware > Keyboard submenu.

您可能已启用(选中)“将所有键盘快捷键发送到设备”模式。它位于硬件 > 键盘子菜单中。

Pressing both Left and Right Cmdkeys at the same time will exit keyboard capturing mode and re-enable menu shortcuts.

同时按下左右Cmd键将退出键盘捕获模式并重新启用菜单快捷键。

回答by Miti shah

You might have disabled(unchecked) "Connect hardware keyboard" option which is in the hardware/keyboard menu. Make sure its checked.

您可能已禁用(未选中)硬件/键盘菜单中的“连接硬件键盘”选项。确保它被选中。