Question: I am using xCode for the first time - since 1986 I've used other IDE's (turboPascal, JBuilder, Eclipse, NetBeans, Tibco BW...) but to the uninitiated Xcode seems reach new levels of awkwardness.

Every time I access help e.g 'API documentation help' the documentation screen obscures all other windows. Presumably there is a magic key that dismisses the documentation screen and return me to the main project screen. (Like a back button in a browser). I've tried many key combinations.

Is there a magic key that always gets you back 'as you were'?

Answer: 
Not elegant, but the only thing I could find. 

I know people are going to comment about using an interval that never ends, but until a better solution is found this is what we have.

```
setInterval(function () {
    var resultInfo = $('.gsc-result:first');
    if (resultInfo.length && !resultInfo.data('isOld')) {
        resultInfo.data('isOld', true);

        console.log('new results');
    }
}, 500);

```
You can determine that search results have changed by watching the results HTML code using MutationObserver.

```
// Where to put search results
var resultsElement = document.getElementById('results');

// Creating results box
window.google.search.cse.element.render({
    div: resultsElement,
    tag: 'searchresults-only',
    attributes: {
        overlayResults: false
    }
});

// Watching the "new results" event
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
new MutationObserver(function(mutations) {
    for (var i = 0; i < mutations.length; ++i) {
        if (mutations[i].target.classList.contains('gsc-results')) {
            console.log('Search complete!');
            break;
        }
    }
}).observe(resultsElement, {
    subtree:       true,
    attributes:    false,
    childList:     true,
    characterData: false
});

```

It works as good as the V1's search complete callback. Old browsers don't support `MutationObserver` but you can use [a polyfill](https://github.com/megawac/MutationObserver.js) to enable it.