/*
 * 特别声明：本技术材料受《中华人民共和国著作权法》、《计算机软件保护条例》等法律、法规、行政
 * 规章以及有关国际条约的保护，赞同科技享有知识产权、保留一切权利并视其为技术秘密。未经本公司书
 * 面许可，任何人不得擅自（包括但不限于：以非法的方式复制、传播、展示、镜像、上载、下载）使用，
 * 不得向第三方泄露、透露、披露。否则，本公司将依法追究侵权者的法律责任。特此声明！
 *
 * Special Declaration: These technical material reserved as the technical secrets by AGREE 
 * TECHNOLOGY have been protected by the "Copyright Law" "ordinances on Protection of Computer 
 * Software" and other relevant administrative regulations and international treaties. Without 
 * the written permission of the Company, no person may use (including but not limited to the 
 * illegal copy, distribute, display, image, upload, and download) and disclose the above 
 * technical documents to any third party. Otherwise, any infringer shall afford the legal 
 * liability to the company.
 */
/**
 * Created by liushuai on 2015/6/5.
 */
/*
 * 特别声明：本技术材料受《中华人民共和国著作权法》、《计算机软件保护条例》等法律、法规、行政
 * 规章以及有关国际条约的保护，赞同科技享有知识产权、保留一切权利并视其为技术秘密。未经本公司书
 * 面许可，任何人不得擅自（包括但不限于：以非法的方式复制、传播、展示、镜像、上载、下载）使用，
 * 不得向第三方泄露、透露、披露。否则，本公司将依法追究侵权者的法律责任。特此声明！
 *
 * Special Declaration: These technical material reserved as the technical secrets by AGREE
 * TECHNOLOGY have been protected by the "Copyright Law" "ordinances on Protection of Computer
 * Software" and other relevant administrative regulations and international treaties. Without
 * the written permission of the Company, no person may use (including but not limited to the
 * illegal copy, distribute, display, image, upload, and download) and disclose the above
 * technical documents to any third party. Otherwise, any infringer shall afford the legal
 * liability to the company.
 */
/**
 * Created by liushuai on 2014/12/8.
 */
define(["adoreapp/hotkey/Keys"], function(keys){
    var generator = {generateKeyStroke: function(e){
        var stroke = "";
        var ctrlKey =  e.ctrlKey;
        stroke = ctrlKey ? stroke + "CTRL+": stroke;
        var shiftKey =  e.shiftKey;
        stroke = shiftKey ? stroke + "SHIFT+" : stroke;
        var altKey =  e.altKey;
        stroke = altKey ? stroke + "ALT+" : stroke;
        switch(e.keyCode)
        {
            case keys.BACKSPACE:
                stroke = stroke + "BS";
                break;
            case keys.TAB:
                stroke = stroke + "TAB";
                break;
            case keys.CLEAR:
                stroke = stroke + "CLEAR";
                break;
            case keys.ENTER:
                stroke = stroke + "CR";
                break;
            case keys.CAPS_LOCK:
                stroke = stroke + "CAPS";
                break;
            case keys.ESCAPE:
                stroke = stroke + "ESC";
                break;
            case keys.SPACE:
                stroke = stroke + "SPACE";
                break;
            case keys.PAGE_UP:
                stroke = stroke + "PAGE_UP";
                break;
            case keys.PAGE_DOWN:
                stroke = stroke + "PAGE_DOWN";
                break;
            case keys.END:
                stroke = stroke + "END";
                break;
            case keys.HOME:
                stroke = stroke + "HOME";
                break;
            case keys.LEFT_ARROW:
                stroke = stroke + "ARROW_LEFT";
                break;
            case keys.UP_ARROW:
                stroke = stroke + "ARROW_UP";
                break;
            case keys.RIGHT_ARROW:
                stroke = stroke + "ARROW_RIGHT";
                break;
            case keys.DOWN_ARROW:
                stroke = stroke + "ARROW_DOWN";
                break;
            case keys.INSERT:
                stroke = stroke + "INS";
                break;
            case keys.DELETE:
                stroke = stroke + "DEL";
                break;
            case keys.HELP:
                stroke = stroke + "HELP";
                break;
            case keys.LEFT_WINDOW:
                stroke = stroke + "LEFT_WINDOW";
                break;
            case keys.RIGHT_WINDOW:
                stroke = stroke + "RIGHT_WINDOW";
                break;
            case keys.SELECT:
                stroke = stroke + "SELECT";
                break;
            case keys.NUMPAD_0:
                stroke = stroke + "NUMPAD_0";
                break;
            case keys.NUMPAD_1:
                stroke = stroke + "NUMPAD_1";
                break;
            case keys.NUMPAD_2:
                stroke = stroke + "NUMPAD_2";
                break;
            case keys.NUMPAD_3:
                stroke = stroke + "NUMPAD_3";
                break;
            case keys.NUMPAD_4:
                stroke = stroke + "NUMPAD_4";
                break;
            case keys.NUMPAD_5:
                stroke = stroke + "NUMPAD_5";
                break;
            case keys.NUMPAD_6:
                stroke = stroke + "NUMPAD_6";
                break;
            case keys.NUMPAD_7:
                stroke = stroke + "NUMPAD_7";
                break;
            case keys.NUMPAD_8:
                stroke = stroke + "NUMPAD_8";
                break;
            case keys.NUMPAD_9:
                stroke = stroke + "NUMPAD_9";
                break;
            case keys.NUMPAD_MULTIPLY:
                stroke = stroke + "NUMPAD_MULTIPLY";
                break;
            case keys.NUMPAD_PLUS:
                stroke = stroke + "NUMPAD_PLUS";
                break;
            case keys.NUMPAD_ENTER:
                stroke = stroke + "CR";
                break;
            case keys.NUMPAD_MINUS:
                stroke = stroke + "NUMPAD_MINUS";
                break;
            case keys.NUMPAD_PERIOD:
                stroke = stroke + "NUMPAD_PERIOD";
                break;
            case keys.NUMPAD_DIVIDE:
                stroke = stroke + "NUMPAD_DIVIDE";
                break;
            case keys.F1:
                stroke = stroke + "F1";
                break;
            case keys.F2:
                stroke = stroke + "F2";
                break;
            case keys.F3:
                stroke = stroke + "F3";
                break;
            case keys.F4:
                stroke = stroke + "F4";
                break;
            case keys.F5:
                stroke = stroke + "F5";
                break;
            case keys.F6:
                stroke = stroke + "F6";
                break;
            case keys.F7:
                stroke = stroke + "F7";
                break;
            case keys.F8:
                stroke = stroke + "F8";
                break;
            case keys.F9:
                stroke = stroke + "F9";
                break;
            case keys.F10:
                stroke = stroke + "F10";
                break;
            case keys.F11:
                stroke = stroke + "F11";
                break;
            case keys.F12:
                stroke = stroke + "F12";
                break;
            case keys.F13:
                stroke = stroke + "F13";
                break;
            case keys.F14:
                stroke = stroke + "F14";
                break;
            case keys.F15:
                stroke = stroke + "F15";
                break;
            case keys.NUM_LOCK:
                stroke = stroke + "NUM_LOCK";
                break;
            case keys.SCROLL_LOCK:
                stroke = stroke + "SCROLL_LOCK";
                break;
            case keys.UP_DPAD:
                stroke = stroke + "UP_DPAD";
                break;
            case keys.DOWN_DPAD:
                stroke = stroke + "DOWN_DPAD";
                break;
            case keys.LEFT_DPAD:
                stroke = stroke + "LEFT_DPAD";
                break;
            case keys.RIGHT_DPAD:
                stroke = stroke + "RIGHT_DPAD";
                break;
            case keys.NUM_0:
                stroke = stroke + "0";
                break;
            case keys.NUM_1:
                stroke = stroke + "1";
                break;
            case keys.NUM_2 :
                stroke = stroke + "2";
                break;
            case keys.NUM_3 :
                stroke = stroke + "3";
                break;
            case keys.NUM_4 :
                stroke = stroke + "4";
                break;
            case keys.NUM_5 :
                stroke = stroke + "5";
                break;
            case keys.NUM_6 :
                stroke = stroke + "6";
                break;
            case keys.NUM_7 :
                stroke = stroke + "7";
                break;
            case keys.NUM_8 :
                stroke = stroke + "8";
                break;
            case keys.NUM_9 :
                stroke = stroke + "9";
                break;
            case keys.CHAR_A :
                stroke = stroke + "A";
                break;
            case keys.CHAR_B :
                stroke = stroke + "B";
                break;
            case keys.CHAR_C :
                stroke = stroke + "C";
                break;
            case keys.CHAR_D :
                stroke = stroke + "D";
                break;
            case keys.CHAR_E :
                stroke = stroke + "E";
                break;
            case keys.CHAR_F :
                stroke = stroke + "F";
                break;
            case keys.CHAR_G :
                stroke = stroke + "G";
                break;
            case keys.CHAR_H :
                stroke = stroke + "H";
                break;
            case keys.CHAR_I :
                stroke = stroke + "I";
                break;
            case keys.CHAR_J :
                stroke = stroke + "J";
                break;
            case keys.CHAR_K :
                stroke = stroke + "K";
                break;
            case keys.CHAR_L :
                stroke = stroke + "L";
                break;
            case keys.CHAR_M :
                stroke = stroke + "M";
                break;
            case keys.CHAR_N :
                stroke = stroke + "N";
                break;
            case keys.CHAR_O :
                stroke = stroke + "O";
                break;
            case keys.CHAR_P :
                stroke = stroke + "P";
                break;
            case keys.CHAR_Q :
                stroke = stroke + "Q";
                break;
            case keys.CHAR_R :
                stroke = stroke + "R";
                break;
            case keys.CHAR_S :
                stroke = stroke + "S";
                break;
            case keys.CHAR_T :
                stroke = stroke + "T";
                break;
            case keys.CHAR_U :
                stroke = stroke + "U";
                break;
            case keys.CHAR_V :
                stroke = stroke + "V";
                break;
            case keys.CHAR_W :
                stroke = stroke + "W";
                break;
            case keys.CHAR_X :
                stroke = stroke + "X";
                break;
            case keys.CHAR_Y :
                stroke = stroke + "Y";
                break;
            case keys.CHAR_Z :
                stroke = stroke + "Z";
                break;
            default:
        }
        return stroke;
    }};
    return generator;
})
