function formatKeyDescriptor(descriptor) {
        var displayStr;

        if (brackets.platform === "mac") {
            displayStr = descriptor.replace(/-(?!$)/g, "");     // remove dashes
            displayStr = displayStr.replace("Ctrl", "\u2303");  // Ctrl > control symbol
            displayStr = displayStr.replace("Cmd", "\u2318");   // Cmd > command symbol
            displayStr = displayStr.replace("Shift", "\u21E7"); // Shift > shift symbol
            displayStr = displayStr.replace("Alt", "\u2325");   // Alt > option symbol
        } else {
            displayStr = descriptor.replace("Ctrl", Strings.KEYBOARD_CTRL);
            displayStr = displayStr.replace("Shift", Strings.KEYBOARD_SHIFT);
            displayStr = displayStr.replace(/-(?!$)/g, "+");
        }

        displayStr = displayStr.replace("Space", Strings.KEYBOARD_SPACE);

        displayStr = displayStr.replace("PageUp", Strings.KEYBOARD_PAGE_UP);
        displayStr = displayStr.replace("PageDown", Strings.KEYBOARD_PAGE_DOWN);
        displayStr = displayStr.replace("Home", Strings.KEYBOARD_HOME);
        displayStr = displayStr.replace("End", Strings.KEYBOARD_END);

        displayStr = displayStr.replace("Ins", Strings.KEYBOARD_INSERT);
        displayStr = displayStr.replace("Del", Strings.KEYBOARD_DELETE);

        return displayStr;
    }
function formatKeyDescriptor(descriptor) {
        var displayStr;

        if (brackets.platform === "mac") {
            displayStr = descriptor.replace(/-(?!$)/g, "");     // remove dashes
            displayStr = displayStr.replace("Ctrl", "\u2303");  // Ctrl > control symbol
            displayStr = displayStr.replace("Cmd", "\u2318");   // Cmd > command symbol
            displayStr = displayStr.replace("Shift", "\u21E7"); // Shift > shift symbol
            displayStr = displayStr.replace("Alt", "\u2325");   // Alt > option symbol
        } else {
            displayStr = descriptor.replace("Ctrl", Strings.KEYBOARD_CTRL);
            displayStr = displayStr.replace("Shift", Strings.KEYBOARD_SHIFT);
            displayStr = displayStr.replace(/-(?!$)/g, "+");
        }

        displayStr = displayStr.replace("Space", Strings.KEYBOARD_SPACE);

        displayStr = displayStr.replace("PageUp", Strings.KEYBOARD_PAGE_UP);
        displayStr = displayStr.replace("PageDown", Strings.KEYBOARD_PAGE_DOWN);
        displayStr = displayStr.replace("Home", Strings.KEYBOARD_HOME);
        displayStr = displayStr.replace("End", Strings.KEYBOARD_END);

        displayStr = displayStr.replace("Ins", Strings.KEYBOARD_INSERT);
        displayStr = displayStr.replace("Del", Strings.KEYBOARD_DELETE);

        return displayStr;
    }
function formatKeyDescriptor ( descriptor ) { var displayStr ; if ( brackets . platform === "mac" ) { displayStr = descriptor . replace ( / -(?!$) / g , "" ) ; // remove dashes displayStr = displayStr . replace ( "Ctrl" , "\u2303" ) ; // Ctrl > control symbol displayStr = displayStr . replace ( "Cmd" , "\u2318" ) ; // Cmd > command symbol displayStr = displayStr . replace ( "Shift" , "\u21E7" ) ; // Shift > shift symbol displayStr = displayStr . replace ( "Alt" , "\u2325" ) ; // Alt > option symbol } else { displayStr = descriptor . replace ( "Ctrl" , Strings . KEYBOARD_CTRL ) ; displayStr = displayStr . replace ( "Shift" , Strings . KEYBOARD_SHIFT ) ; displayStr = displayStr . replace ( / -(?!$) / g , "+" ) ; } displayStr = displayStr . replace ( "Space" , Strings . KEYBOARD_SPACE ) ; displayStr = displayStr . replace ( "PageUp" , Strings . KEYBOARD_PAGE_UP ) ; displayStr = displayStr . replace ( "PageDown" , Strings . KEYBOARD_PAGE_DOWN ) ; displayStr = displayStr . replace ( "Home" , Strings . KEYBOARD_HOME ) ; displayStr = displayStr . replace ( "End" , Strings . KEYBOARD_END ) ; displayStr = displayStr . replace ( "Ins" , Strings . KEYBOARD_INSERT ) ; displayStr = displayStr . replace ( "Del" , Strings . KEYBOARD_DELETE ) ; return displayStr ; }
Convert normalized key representation to display appropriate for platform.
@param {!string} descriptor Normalized key descriptor.
@return {!string} Display/Operating system appropriate string
Convert normalized key representation to display appropriate for platform .
Format key descriptor