var keyCodes = {
    getKeyCode : function(keyStr, OSspec){
        var keyCodeOS = this.keyCodes[keyStr];
        if(keyCodeOS){
            return keyCodeOS[(OSspec && ((osIsWindows() && "win") || "mac")) || "uni"]
        }else{
            return undefined
        }
        
    },
    getUsedKeyCodesRegisterStr : function(){
        var keyCodesAry = []
        for(var keyCodeStr in this.keyCodes){
            if(this.keyCodes.hasOwnProperty(keyCodeStr)){
                keyCodesAry.push(keyCodes.getKeyCode(keyCodeStr, true))
            }
        }
        return JSON.stringify(keyCodesAry.map(function(item){
            return {keyCode: item}
        }))
    },
    keyCodes: {
        enter : {
            win: 13,
            mac: 36,
            uni: 13
        },
        backspace : {
            win: 8,
            mac: 51,
            uni: 8
        },
        delete : {
            win: 46,
            mac: 117,
            uni: 46
        }
    }
}