6

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.

buildsucceeded
  • 4,203
  • 4
  • 34
  • 72
  • Noticed that this can be fixed by Cmd-T to open a new tab with the same file. Old tab broken, new tab works. – buildsucceeded Mar 14 '16 at 17:18
  • I don't seem to be able to use command-option-R to perform a "Find and Replace". Xcode just ignores the key sequence. I can change it to anything else and it works, just not command-option-R. Wonder if there is not some kind of keyboard processing issue. Same in Xcode 8 as Xcode 10 beta – Cerniuk Jun 27 '17 at 14:56

3 Answers3

2

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

Originally posted my answer here

Community
  • 1
  • 1
atulkhatri
  • 10,896
  • 3
  • 53
  • 89
0

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+/.

Chishti
  • 9
  • 2
0

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

buildsucceeded
  • 4,203
  • 4
  • 34
  • 72