WebSquare.uiplugin.gridView.prototype.initializeEvent = function() {
    try {
        this.otherClickEvent();

        this.checkResize();
        var preventCopyColumn = this.options.preventCopyColumn;
        var preventPasteColumn = this.options.preventPasteColumn;
        this.event.addListener(this.render, "ondblclick", this.event.bindAsEventListener(this, this.handleDblClickEvent));
        this.event.addListener(this.render, "onclick", this.event.bindAsEventListener(this, this.handleClickEvent));
        if (!WebSquare.util.isIEAllVersion()) {
            if (WebSquare.core.browserCheck.safari) {
                this.event.addListener(WebSquare.getBody().render, "onbeforecopy", this.event.bindAsEventListener(this, this.handleBeforeCopyEvent));
                this.event.addListener(WebSquare.getBody().render, "oncopy", this.event.bindAsEventListener(this, this.handleCopyEvent));
                this.event.addListener(WebSquare.getBody().render, "onbeforecut", this.event.bindAsEventListener(this, this.handleBeforeCutEvent));
                this.event.addListener(WebSquare.getBody().render, "oncut", this.event.bindAsEventListener(this, this.handleCutEvent));
                this.event.addListener(this.render, "onpaste", this.event.bindAsEventListener(this, this.handlePasteEvent));
            } else {
                if (!WebSquare.core.browserCheck.chrome) {
                    this.event.addListener(this.render, "oncopy", this.event.bindAsEventListener(this, this.handleCopyEvent));
                    this.event.addListener(this.render, "oncut", this.event.bindAsEventListener(this, this.handleCutEvent));
                    this.event.addListener(this.render, "onpaste", this.event.bindAsEventListener(this, this.handlePasteEvent));
                }
            }
        } else if (WebSquare.util.isIEAllVersion()) {
            this.event.addListener(this.render, "oncopy", this.event.bindAsEventListener(this, function(e) {
                if (!this.options.preventCopy || (preventCopyColumn && (preventCopyColumn.indexOf(this.getFocusedColumnID()) > -1))) {
                    WebSquare.event.preventDefault(e);
                }
            }));
            this.event.addListener(this.render, "oncut", this.event.bindAsEventListener(this, function(e) {
                if (!this.options.preventCopy || (preventCopyColumn && (preventCopyColumn.indexOf(this.getFocusedColumnID()) > -1))) {
                    WebSquare.event.preventDefault(e);
                }
            }));
            this.event.addListener(this.render, "onpaste", this.event.bindAsEventListener(this, function(e) {
                if ((this.options.preventPaste || (preventPasteColumn && (preventPasteColumn.indexOf(this.getFocusedColumnID()) > -1))) && !this.editedCell) {
                    WebSquare.event.preventDefault(e);
                }
            }));
        }

        if (!this.isMobile) {
            this.event.addListener(this.getElementById(this.id + "_head_table"), "onmouseover", this.event.bindAsEventListener(this, this.gridDataLayerOut));
            this.event.addListener(this.getElementById(this.id + "_scrollX_div"), "onmouseover", this.event.bindAsEventListener(this, this.gridDataLayerOut));
            this.event.addListener(this.getElementById(this.id + "_scrollY_div"), "onmouseover", this.event.bindAsEventListener(this, this.gridDataLayerOut));
            this.event.addListener(this.getElementById(this.id + "_dataLayer"), "onmouseover", this.event.bindAsEventListener(this, this.gridOver));
            if (this.hasFooter) {
                this.event.addListener(this.getElementById(this.id + "_foot_table"), "onmouseover", this.event.bindAsEventListener(this, this.gridOver));
            }
        }
        var useHammer = (this.isMobile || window.navigator.msPointerEnabled) && this.options.hammerEnabled;

        this.event.addListener(this.getElementById(this.id + "_dataLayer"), "oncontextmenu", this.event.bindAsEventListener(this, this.clickRightButtonCell));
        if (!useHammer) {
            this.event.addListener(this.render, "onmouseout", this.event.bindAsEventListener(this, this.gridOut));
        }
        this.event.addListener(this.render, "onkeydown", this.event.bindAsEventListener(this, this.handleKeyDownEvent));
        this.event.addListener(this.render, "onkeyup", this.event.bindAsEventListener(this, this.handleKeyUpEvent));
        if (WebSquare.util.isOpera()) {
            this.event.addListener(this.render, "onkeypress", function(e) {
                if (e.keyCode == 9 || e.keyCode == 27) {
                    WebSquare.event.preventDefault(e);
                }
            });
        }

        if (this.options.dataDragDrop) {
            if (this.isMobile == true) {
            } else {
                this.event.addListener(this.render, "onmousedown", this.event.bindAsEventListener(this, this.handleDragEvent));
            }
        } else if (!this.options.dataDragDrop && this.options.dataDragSelect) {
            if (!this.isMobile) {
                this.event.addListener(this.getElementById(this.id + "_dataLayer"), "onmousedown", this.event.bindAsEventListener(this, this.handleDragSelectEvent));
            }
        }
        WebSquare.core.setTimer(function() {
            this.event.addListener(this.render, "onmousedown", this.event.bindAsEventListener(this, function(e) {
                var layerListener = WebSquare.getBody().getLayerListener();
                if (layerListener.layers[this.id]) {
                    var component = layerListener.layers[this.id].component;
                    var excludeObj = {};
                    while (component.parentControl) {
                        component = component.parentControl;
                        for (var id in layerListener.useOtherComponentId) {
                            if (layerListener.useOtherComponentId[id] == component.id) {
                                excludeObj[id] = true;
                            }
                        }
                    }
                    WebSquare.getBody().getLayerListener().hideAll(excludeObj);
                }
                if (!this.parentControl || !this.parentControl.options || (this.parentControl.options.pluginName != "gridItemTable" && this.parentControl.options.pluginName != "gridViewItemTable")) {
                    WebSquare.event.stopPropagation(e);
                };
            }));
        }, {
            key: this.id + "initializeEvent",
            caller: this,
            delay: 100
        });

        if (this.isMobile) {
            this.iScroll = {};
            this.event.addListener(this.render, "ontouchstart", this.event.bindAsEventListener(this, this.handleTouchStart));
            this.event.addListener(this.render, "ontouchmove", this.event.bindAsEventListener(this, this.handleTouchMove));
            this.event.addListener(this.render, "ontouchend", this.event.bindAsEventListener(this, this.handleTouchEnd));
        } else if (window.navigator.msPointerEnabled && window.navigator.userAgent.toLowerCase().indexOf("touch") != -1) {
            this.iScroll = {};
            this.render.style.touchAction = "none";
            this.event.addListener(this.render, "onMSPointerDown", this.event.bindAsEventListener(this, this.handleTouchStart));
            this.event.addListener(this.render, "onMSPointerMove", this.event.bindAsEventListener(this, this.handleTouchMove));
            this.event.addListener(this.render, "onMSPointerUp", this.event.bindAsEventListener(this, this.handleTouchEnd));
        } else if (this.options.senseReader) {
            this.event.addListener(this.getElementById(this.id + "_gridstart_div"), "onfocus", this.event.bindAsEventListener(this, this.handleStartDivFocus));
            this.event.addListener(this.getElementById(this.id + "_gridend_div"), "onfocus", this.event.bindAsEventListener(this, this.handleEndDivFocus));
            this.event.addListener(this.getElementById(this.id + "_gridend_div"), "onkeydown", this.event.bindAsEventListener(this, this.handleEndDivKeyDown));
            this.event.addListener(this.getElementById(this.id + "_gridend_div"), "onkeyup", this.event.bindAsEventListener(this, this.handleEndDivKeyUp));
        }

        if (useHammer) {
            try {
                if (typeof Hammer === "undefined" || Hammer == null) {
                    imports("externalJS/hammer.min.js");
                }
                this._manager = new Hammer.Manager(this.render);
                this._manager.add(new Hammer.Press({
                    "time": this.options.hammerPressTime
                }));
                this._manager.on("press", this.event.bindAsEventListener(this, function(e) {
                    var srcElem = WebSquare.event.getTarget(e);
                    var rowPosition = -1;

                    while (srcElem && srcElem.tagName != "BODY") {
                        if (srcElem.tagName == "TD" && this.hasClass(srcElem, this.options.bodyTdClass)) {
                            rowPosition = this.getElemRowIndex(srcElem);
                            break;
                        }
                        srcElem = srcElem.parentNode;
                    }

                    this.removeFocusedCell();
                    this._dataList.setRowPosition(rowPosition);
                    this.handleDblClickEvent(e);
                    WebSquare.event.fireEvent(this, "ondblclick", e);
                }));
            } catch (e) {
                WebSquare.exception.printStackTrace(e, null, this);
            }
        }

        this.initializeLayoutEvents();
        WebSquare.util.setInterval(this.checkResize, {
            key: this.id + "_checkResize",
            caller: this,
            delay: 70
        });

    } catch (e) {
        WebSquare.exception.printStackTrace(e, null, this);
    }
};

WebSquare.uiplugin.gridView.prototype.handleBodyKeyDown = function(e) {
    this.isKeyPressed = true;
    if (!this.editMode) {
        if(this.options.ignoreKeyCheckFunction) {
            var ignoreCheckFunc = null;
            var isIgnoreKey = false;
            try {
                if (typeof this.options.ignoreKeyCheckFunction == "function") {
                    ignoreCheckFunc = this.options.ignoreKeyCheckFunction;
                } else {
                    ignoreCheckFunc = WebSquare.util.getGlobalFunction(this.options.ignoreKeyCheckFunction, this.scope_id);
                    if (ignoreCheckFunc != null) {
                        this.options.ignoreKeyCheckFunction = ignoreCheckFunc;
                    }
                }
                isIgnoreKey = ignoreCheckFunc.call(this, e);

                if(isIgnoreKey) {
                    return;
                }
            } catch (e) {
                ignoreCheckFunc = null;
            }
        }
        if (this.options.focusMode != "none" && (this._getFocusedRowIndex() == -1 || this.getFocusedColumnIndex() == null)) {
            if (e.keyCode == 13 && document.activeElement == this.render) {
                this._setFocusedCell();
                WebSquare.event.stopEvent(e);
            }
            if (WebSquare.event.getTarget(e).tagName == "A") {
                var it = this.event.getTargetIterator(e, this.render);
                var matched = false;
                while (it.next()) {
                    if (it.match("gridBodyDefault")) {
                        matched = true;
                        var srcElem = it.getElement();
                        var tdIndex = parseInt(srcElem.getAttribute("tdIndex"));
                        var trIndex = parseInt(tdIndex / this.realRowDataLength);
                        var colIndex = srcElem.getAttribute("col_id");
                        var colIndexNum = this.getColumnIndex(colIndex);
                        this.focusedCell.push({
                            focusedTd: srcElem,
                            focusedRowIndex: trIndex,
                            focusedColIndex: colIndexNum
                        });
                        var link = srcElem.getElementsByTagName("a");
                        if (this.focusedCellLinkIndex == -1) {
                            for (var i = 0; i < link.length; i++) {
                                if (document.activeElement == link[i]) {
                                    this.focusedCellLinkIndex = i;
                                }
                            }
                        }
                        this.focusedCellLinkLength = link.length;
                        break;
                    }
                }
                if (!matched)
                    return;
            } else {
                return;
            }
        }

        var keyMove = false;
        var preventPasteColumn = this.options.preventPasteColumn;
        if (WebSquare.core.browserCheck.safari && (e.ctrlKey || e.metaKey)) {
            this.tempEditableCell = document.activeElement;
            this.tempEditableCell.contentEditable = "true";
            this.tempEditableCell.style.textShadow = "0 0 0 " + WebSquare.style.getStyle(this.tempEditableCell, "color");
            this.tempEditableCell.style.color = "transparent";
            var _this = this;
            WebSquare.core.setTimer(function() {
                _this.tempEditableCell.contentEditable = "inherit";
                var textShadowStr = this.tempEditableCell.style.textShadow;
                this.tempEditableCell.style.color = "";
                this.tempEditableCell.style.textShadow = "";
            }, {
                key: this.id + "_tempEditableCell_contentEditable",
                caller: this,
                delay: 500
            });
        }
        switch (e.keyCode) {
            case 37:
            case 39:
                if (this.options.moveKeyEditMode) {
                    var direction = (e.keyCode == 37) ? "left" : "right";
                    this.moveHorizontal(false, direction, true);
                    WebSquare.event.stopEvent(e);
                    return;
                }
            case 38:
            case 40:
                this.skipScrollEndEvent = false;
                if (this.options.moveKeyEditMode) {
                    var direction = (e.keyCode == 38) ? "up" : "down";
                    this.moveVertical(false, direction, true);
                    WebSquare.event.stopEvent(e);
                    return;
                }
            case 33:
            case 34:
            case 35:
            case 36:
            case 9:
                keyMove = true;
                break;
            case 13:
                if (this.options.senseReader && this.options.focusImage && this.getLastFocusedCell().focusedColIndex) {
                    var cellInfo = this.getCellInfo(this.getLastFocusedCell().focusedColIndex);
                    if (cellInfo && cellInfo.options.inputType == "image") {
                        var it = this.event.getTargetIterator(e, this.render);
                        while (it.next()) {
                            if (it.match("w2grid_image")) {
                                var imageClickFunc = WebSquare.util.getGlobalFunction(cellInfo.options.imageClickFunction, this.scope_id);
                                if (typeof imageClickFunc == "function") {
                                    imageClickFunc.call(this, this.getLastFocusedCell().focusedRowIndex, cellInfo.id, this.dataList.getCellData(this.getLastFocusedCell().focusedRowIndex, cellInfo.id));
                                }
                            }
                        }
                    }
                }
                if (this.options.senseReader && this.getLastFocusedCell().focusedColIndex != null) {
                    var cellInfo = this.getCellInfo(this.getLastFocusedCell().focusedColIndex);
                    if (cellInfo && cellInfo.options.inputType == "select" && cellInfo.options.tableRender == "ul") {
                        this.setEditHtml(e);
                        WebSquare.event.stopEvent(e);
                        return;
                    }
                }
                keyMove = true;
                break;
            default:
                keyMove = false;
                break;
        }

        if (keyMove == true && this.options.focusMove == "false") {
            var keyCode = (e.charCode) ? e.charCode : e.keyCode;
            if (!this.options.senseReader) {
                return;
            } else if (keyCode != 9) {
                return;
            }
        }
        if (this.F2Mode) {
            switch (e.keyCode) {
                case 8:
                case 46:
                case 35:
                case 36:
                case 37:
                case 38:
                case 39:
                case 40:
                    return;
            }
        }

        switch (e.keyCode) {
            case 4:
                break;
            case 46:
                this.removeCellData(e);
                WebSquare.event.stopEvent(e);
                break;
            case 32:
                this.doDefaultAction(e);
                break;
            case 33:
                this.movePageUp(e);
                WebSquare.event.stopEvent(e);
                break;
            case 34:
                this.movePageDown(e);
                WebSquare.event.stopEvent(e);
                break;
            case 35:
                this.moveHorizontal(e, "end");
                WebSquare.event.stopEvent(e);
                break;
            case 36:
                this.moveHorizontal(e, "home");
                WebSquare.event.stopEvent(e);
                break;
            case 37:
                this.moveHorizontal(e, "left");
                WebSquare.event.stopEvent(e);
                break;
            case 38:
                this.moveVertical(e, "up");
                WebSquare.event.stopEvent(e);
                break;
            case 39:
                this.moveHorizontal(e, "right");
                WebSquare.event.stopEvent(e);
                break;
            case 40:
                this.moveVertical(e, "down");
                WebSquare.event.stopEvent(e);
                break;
            case 9:
                if (this.options.senseReader && this.options.focusImage && this.getLastFocusedCell().focusedColIndex) {
                    var cellInfo = this.getCellInfo(this.getLastFocusedCell().focusedColIndex);
                    if (cellInfo && cellInfo.options.inputType == "image") {
                        WebSquare.event.stopPropagation(e);
                        var it = this.event.getTargetIterator(e, this.render);
                        while (it.next()) {
                            if (it.match("w2grid_image")) {
                                if (WebSquare.event.getTarget(e) == this.render) {
                                    this.getLastFocusedCell().focusedTd.setAttribute("tabIndex", -1);
                                } else {
                                    var ret = this.moveHorizontal(e, e.shiftKey ? "left" : "right", this.options.keyMoveEditMode);
                                    if (ret || this.options.focusFlow != "linear") {
                                        WebSquare.event.stopEvent(e);
                                    }
                                }
                            }
                        }
                    }
                } else if (WebSquare.event.getTarget(e) == this.render) {
                    this.getLastFocusedCell().focusedTd.setAttribute("tabIndex", -1);
                } else {
                    var ret = this.moveHorizontal(e, e.shiftKey ? "left" : "right", this.options.keyMoveEditMode);
                    if (ret || this.options.focusFlow != "linear") {
                        WebSquare.event.stopEvent(e);
                    }
                }
                break;
            case 13:
                if (this.options.enterKeyMove == "edit") {
                    this.setEditHtml(e);
                } else if (this.options.enterKeyMove == "none") {
                } else if (this.options.enterKeyMove == "right") {
                    this.moveHorizontal(e, e.shiftKey ? "left" : "right", this.options.keyMoveEditMode);
                } else {
                    this.moveVertical(e, e.shiftKey ? "up" : "down", this.options.keyMoveEditMode);
                }
                WebSquare.event.stopEvent(e);
                break;
            case 67:
                if (e.ctrlKey || e.metaKey) {
                    if (WebSquare.util.isIEAllVersion()) {
                        this.handleCopyEvent({});
                    } else if (!WebSquare.util.isIEAllVersion()) {
                        if (WebSquare.core.browserCheck.moz || WebSquare.core.browserCheck.chrome) {
                            var activeElement = document.activeElement;
                            var tempArea = document.createElement("textarea");
                            var _this = this;
                            var body = document.getElementsByTagName("body")[0];
                            tempArea.oncopy = function(e) {
                                _this.handleCopyEvent(e);
                                body.removeChild(this);
                                if(document.activeElement != activeElement) {
                                    activeElement.focus();
                                }
                            };
                            tempArea.textContent = "temp";

                            body.appendChild(tempArea);
                            tempArea.select();
                            try {
                                document.execCommand("copy");
                            } catch (e) {
                            }
                        }
                    }
                } else {
                    var directItemChoice = WebSquare.util.getBoolean(e.srcElement.getAttribute("directItemChoice"));
                    if (directItemChoice) {
                        this.directItemChoiceKeyObj.select = e.keyCode;
                    }
                    this.setEditHtml(e);
                }
                break;
            case 88:
                if (e.ctrlKey || e.metaKey) {
                    if (WebSquare.util.isIEAllVersion()) {
                        this.handleCutEvent({});
                    } else if (!WebSquare.util.isIEAllVersion()) {
                        if (WebSquare.core.browserCheck.moz || WebSquare.core.browserCheck.chrome) {
                            var tempArea = document.createElement("textarea");
                            var _this = this;
                            var body = document.getElementsByTagName("body")[0];
                            tempArea.oncut = function(e) {
                                _this.handleCutEvent(e);
                                body.removeChild(this);
                            };
                            tempArea.textContent = "temp";

                            body.appendChild(tempArea);
                            tempArea.select();
                            try {
                                document.execCommand("cut");
                            } catch (e) {
                            }
                        }
                    }
                }
                break;
            case 86:
                if (e.ctrlKey || e.metaKey) {
                    if ((this.options.preventPaste || (preventPasteColumn && (preventPasteColumn.indexOf(this.getFocusedColumnID()) > -1))) && !this.editedCell) {
                        WebSquare.event.stopEvent(e);
                        break;
                    }
                    if (WebSquare.util.isIEAllVersion()) {
                        this.handlePasteEvent({});
                    } else if (!WebSquare.util.isIEAllVersion()) {
                        if (WebSquare.core.browserCheck.moz || WebSquare.core.browserCheck.chrome || WebSquare.core.browserCheck.safari) {
                            var tempArea = document.createElement("textarea");
                            var _this = this;
                            tempArea.style.opacity = "0";
                            tempArea.onpaste = function(e) {
                                _this.handlePasteEvent(e);
                                body.removeChild(this);
                            };
                            tempArea.textContent = "temp";
                            var body = document.getElementsByTagName("body")[0];
                            body.appendChild(tempArea);
                            tempArea.select();
                            try {
                                document.execCommand("paste");
                            } catch (e) {
                            }
                        }
                    }
                } else {
                    var directItemChoice = WebSquare.util.getBoolean(e.srcElement.getAttribute("directItemChoice"));
                    if (directItemChoice) {
                        this.directItemChoiceKeyObj.select = e.keyCode;
                    }
                    this.setEditHtml(e);
                }
                break;
            case 90:
                if (e.ctrlKey) {
                } else {
                    var directItemChoice = WebSquare.util.getBoolean(e.srcElement.getAttribute("directItemChoice"));
                    if (directItemChoice) {
                        this.directItemChoiceKeyObj.select = e.keyCode;
                    }
                    this.setEditHtml(e);
                }
                break;
            case 27:
                if (this.options.focusMode != "none" && this.options.focusFlow != "linear") {
                    this.getLastFocusedCell().focusedTd.setAttribute("tabIndex", -1);
                    this.render.focus();
                }
                break;
            case 16:
            case 17:
            case 18:
            case 21:
            case 229:
            case 25:
            case 91:
            case 20:
            case 112:
            case 113:
            case 114:
            case 115:
            case 116:
            case 117:
            case 118:
            case 119:
            case 120:
            case 121:
            case 122:
            case 123:
                break;
            default:
                if (!e.ctrlKey && !e.metaKey && !e.altKey) {
                    var directItemChoice = WebSquare.util.getBoolean(e.srcElement.getAttribute("directItemChoice"));
                    if (directItemChoice) {
                        this.directItemChoiceKeyObj.select = e.keyCode;
                    }
                    this.setEditHtml(e);
                    if (this.options.directEdit) {
                        var focusedCell = this.focusedCell[this.focusedCell.length - 1];
                        var cellInfo = this.getCellInfo(focusedCell.focusedTd);
                        var input = this.getInput(cellInfo);
                        input.reFocus = true;
                        input._focusStatus = "cancel";
                        WebSquare.text.setCaretPos(input.render, input.render.value.length);

                        var keyCode = e.keyCode;
                        var _character = null;
                        var keyCharHash = {
                            "96": "0",
                            "97": "1",
                            "98": "2",
                            "99": "3",
                            "100": "4",
                            "101": "5",
                            "102": "6",
                            "103": "7",
                            "104": "8",
                            "105": "9",
                            "110": ".",
                            "111": "/",
                            "106": "*",
                            "107": "+",
                            "109": "-",

                            "187": "=",
                            "189": "-",
                            "192": "`",
                            "220 ": "\\"
                        };
                        if (e.key && e.key.length === 1) {
                            _character = e.key;
                        } else if (!e.shiftKey && (65 <= keyCode) && (keyCode <= 90)) {
                            keyCode = keyCode + 32;
                            _character = String.fromCharCode(keyCode);
                        } else if (keyCode >= 96 || keyCode < 65) {
                            _character = keyCharHash[keyCode + ""] || "";
                        } else {
                            _character = String.fromCharCode(keyCode);
                        }

                        input.setValueNM(_character);
                    }
                }
        }
    } else {
        var t = this.editedCell.options.inputType;
        if (t === "text" || t === "textarea" || t === "calendar" || t === "textImage" || t === "secret") {
            this.beforeEditedCellInfo = {
                "rowIndex": this.editedCell.editRowIndex,
                "colIndex": this.getColumnIndex(this.editedCell.id),
                "colID": this.getColumnID(this.editedCell.id),
                "oldValue": this.editedCell.beforeEditValue || "",
                "newValue": this.editedCell._getEditedValue(),
                "inputType": t,
                "keyCode": (e.charCode) ? e.charCode : e.keyCode
            };
        }

        switch (e.keyCode) {
            case 9:
                WebSquare.event.stopEvent(e);
                var ret = this._fireOnviewchange(this.editedCell.id, "handleEndEdit", [e], {
                    "checkFunc": function(ret) {
                        return (ret + "" !== "false");
                    }
                });
                if (ret !== false) {
                    if (!this.moveHorizontal(e, e.shiftKey ? "left" : "right", this.options.keyMoveEditMode)) {
                        this._setFocusedCell(this.editMode);
                    }
                }
                break;

            case 13:
                if (this.editedCell.options.inputType == "textarea" && !e.ctrlKey) {
                    break;
                }
                var ret = this._fireOnviewchange(this.editedCell.id, "handleEndEdit", [e], {
                    "checkFunc": function(ret) {
                        return (ret + "" !== "false");
                    }
                });
                if (ret !== false) {
                    var success = false;
                    if (this.options.enterKeyMove == "right") {
                        success = this.moveHorizontal(e, e.shiftKey ? "left" : "right", this.options.keyMoveEditMode);
                    } else if (this.options.enterKeyMove != "none") {
                        success = this.moveVertical(e, e.shiftKey ? "up" : "down", this.options.keyMoveEditMode);
                    }
                    if (!success) {
                        this._setFocusedCell(this.editMode);
                    }
                }
                break;

            case 27:
                this.editedCell.handleCancelEdit(e);
                this._setFocusedCell();
                WebSquare.event.stopEvent(e);
                break;
            case 86:
                if (e.ctrlKey || e.metaKey) {
                    if ((this.options.preventPaste || (preventPasteColumn && (preventPasteColumn.indexOf(this.getFocusedColumnID()) > -1))) && !this.editedCell) {
                        WebSquare.event.stopEvent(e);
                        break;
                    }
                }
            default:
                var info = {};
                info.rowIndex = this.editedCell.editRowIndex;
                info.colIndex = this._dataList.getColumnIndex(this.editedCell.id);
                info.colID = this.editedCell.id;
                info.keyCode = (e.charCode) ? e.charCode : e.keyCode;
                if (this.editedCell._getEditedValue) {
                    this.editedCell.beforeEditValue = this.editedCell._getEditedValue();
                }
                WebSquare.event.fireEvent(this, "oneditkeydown", info);
                break;
        }
    }
    this.isKeyPressed = false;
};