Keyboard shortcuts in Xcode stop working

烂漫一生 提交于 2019-12-10 14:45:49

问题


I first noticed this with Cmd-/ occasionally refusing to work for comment-uncomment lines of code. But now (having just gone to XCode 4.1, although that may not be related) it's happened with Cmd-B to build as well.

I can't figure out what I'm doing to cause this, or if there's any pattern to when it happens.


回答1:


Hit command+[ once and then command+/ starts working. You can hit command+] again to undo the indentation effect.

Originally posted my answer here




回答2:


Seems to have been fixed in 4.2. As an answer, perhaps unsatisfying, but at least it's resolved.




回答3:


In my case my keyboard was working in other files the current opened file was locked. Just reveal in finder your current file where your keyboard was not working, and go to info (Cmd+I) of this file in finder and unlock this file. Your keyboard will start working for this file.

My page was locked using cmd+/.



来源:https://stackoverflow.com/questions/7306656/keyboard-shortcuts-in-xcode-stop-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!